mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Virtual terminal - AutoFollow off-by-one and clear resets viewport (#2876)
This commit is contained in:
parent
0ec7b7e32b
commit
3e601a1940
1 changed files with 6 additions and 2 deletions
|
|
@ -785,7 +785,9 @@ end;
|
|||
procedure TCustomComTerminal.ClearScreen;
|
||||
begin
|
||||
FBuffer.Init(0, 0);
|
||||
FTopLeft := Classes.Point(1, 1);
|
||||
MoveCaret(1, 1);
|
||||
UpdateScrollRange;
|
||||
Invalidate;
|
||||
end;
|
||||
|
||||
|
|
@ -1361,7 +1363,7 @@ begin
|
|||
end;
|
||||
if FAutoFollow then
|
||||
begin
|
||||
if (FCaretPos.Y - FTopLeft.Y) > FVisibleRows then
|
||||
if (FCaretPos.Y - FTopLeft.Y) >= FVisibleRows then
|
||||
begin
|
||||
I:= FCaretPos.Y - FVisibleRows + 1;
|
||||
ModifyScrollBar(SB_Vert, SB_THUMBPOSITION, I);
|
||||
|
|
@ -1773,7 +1775,9 @@ begin
|
|||
ecEraseScreen:
|
||||
begin
|
||||
FBuffer.EraseScreenRight(1, 1);
|
||||
MoveCaret(1, 1)
|
||||
FTopLeft := Classes.Point(1, 1);
|
||||
MoveCaret(1, 1);
|
||||
UpdateScrollRange;
|
||||
end;
|
||||
ecEraseChar: FBuffer.EraseChar(FCaretPos.X, FCaretPos.Y, GetParam(1, AParams));
|
||||
ecDeleteChar: FBuffer.DeleteChar(FCaretPos.X, FCaretPos.Y, GetParam(1, AParams));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue