[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TerminalView.Count


On Sun, 14 Apr 2024 at 16:05, Benoît Minisini <
benoit.minisini@xxxxxxxxxxxxxxxx> wrote:

> Le 14/04/2024 à 14:24, Bruce Steers a écrit :
> >
> > Okay then , so we can consider TerminalView.Count to be kind of
> > useless/unreliable then if you want to know how many lines of text are
> > showing.
> > BruceS
> >
>
> It's not really useful at the moment. But maybe it will if we implement
> a maximum number of memorized lines. At the moment it's limited only by
> the memory, which is not necessarily a good thing.
>
> Regards,
>
> --
> Benoît Minisini.

I think i'm kind of getting it now.

I was playing with a small width view and when the prompt was at the bottom
and i hit Key.Up a few times it raised the prompt position and expanded the
lines to fit the history text but then hitting up some more the prompt line
stayed at the higher position and did not jump up and down depending on
line length and at that moment it all made sense as to why not delete the
extras. :)

I'll just work around it.

I got some cool enhancements to my terminal prog now that you might find
interesting or of similar usefulness.
Property Read WorkDir As String

Private Function WorkDir_Read() As String
  If Not $hProcess Or If Not $hProcess.State = Process.Running Then Return
  Try Return File.RealPath("/proc/" & $hProcess.Handle &/ "cwd")
End

that seems to work well (in TerminnalView.class) :) (not sure how portable
across systems it is though)

I also have a Goto next space function that jumps words when pressing Crtl
and left or right key.
and it also moves cursor up or down a line when holding Ctrl and pressing
up or down.
both those are super useful for doing things like navigating around a long
paste of the gambas dependencies list to edit/remove package names
(oh the times i've sat there holing Key.Left waiting to get to the words i
want)

The move functions are ugly though as i could not get much reliably working
except sending single left or right cursor hits so based it all around
doing that.
Maybe that's just all I can reliably do with a terminal as like you say ,
"it's not a text editor" so mostly all that i can expect to be able to do
is emulate what i could "actually" do with the keyboard.
Thank you Ben , i know i moan about stuff but TerminalView is a great
component for gambas :)

Respects
BruceS

References:
TerminalView.CountBruce Steers <bsteers4@xxxxxxxxx>
Re: TerminalView.CountBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: TerminalView.CountBruce Steers <bsteers4@xxxxxxxxx>
Re: TerminalView.CountBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>