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

TerminalView issue ensuring visible after output


Someone on the gambasone forum has an issue with terminalview stopping
scrolling with output after lots of output.

I also have experienced this a few times.
Noticeably with perhaps running something like apt upgrade or something
else that outputs a lot of text. it's okay for a while but then it misses
the beat.

Looking at the code hoping to find a glitch and I wonder if i have found an
issue?
In TerminalView.class Output_Timer event.
https://gitlab.com/gambas/gambas/-/blob/master/comp/src/gb.form.terminal/.src/TerminalView/TerminalView.class?ref_type=heads#L1364

It's the order of this code..

  If (($iTargetY + $hView.H) \ $LH) >= $hScreen.Count Then
bEnsureVisible = True  Endif    $hFilter.OutputTo(Me, $hScreen,
hOutput, sBuffer)    If bEnsureVisible Then     $bIgnoreNextAnimation
= True    _EnsureScreen()  Endif

Should not the $hFilter.OutputTo call happen before the calculation
involving $hScreen.Count ?

I would expect something more like this...
  $hFilter.OutputTo(Me, $hScreen, hOutput, sBuffer)
  If (($iTargetY + $hView.H) \ $LH) >= $hScreen.Count Then
$bIgnoreNextAnimation = True    _EnsureScreen()  Endif


Currently my workaround is to use the Process_Read event of the
running process and use EnsureVisible

Public Sub PROC_Read()

  TerminalView1.EnsureVisible


End

But it's probably slowing the terminal output down.

Respects

BruceS

Follow-Ups:
Re: TerminalView issue ensuring visible after outputBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>