Efficient updates and bugfixes
This commit is contained in:
parent
4ba81de29b
commit
fbf1e65dbe
|
@ -240,9 +240,9 @@ Var
|
||||||
If Lines > WinSize Then Begin
|
If Lines > WinSize Then Begin
|
||||||
If TopPage + WinSize <= Lines - WinSize Then Begin
|
If TopPage + WinSize <= Lines - WinSize Then Begin
|
||||||
Inc (TopPage, WinSize);
|
Inc (TopPage, WinSize);
|
||||||
Inc (CurLine, WinSize);
|
// Inc (CurLine, WinSize);
|
||||||
End Else Begin
|
End Else Begin
|
||||||
TopPage := Lines - WinSize - 1;
|
TopPage := Lines - WinSize + 1; //was - 1
|
||||||
CurLine := WinSize;
|
CurLine := WinSize;
|
||||||
End;
|
End;
|
||||||
End Else
|
End Else
|
||||||
|
@ -323,22 +323,25 @@ Begin
|
||||||
If (CurLine = 1) and (TopPage > 1) Then Begin
|
If (CurLine = 1) and (TopPage > 1) Then Begin
|
||||||
Dec (TopPage);
|
Dec (TopPage);
|
||||||
DrawPage;
|
DrawPage;
|
||||||
|
UpdateCursor;
|
||||||
End Else If CurLine > 1 Then Begin
|
End Else If CurLine > 1 Then Begin
|
||||||
LinkOFF(TopPage + CurLine - 1, CurLine + 1, CurLPos);
|
LinkOFF(TopPage + CurLine - 1, CurLine + 1, CurLPos);
|
||||||
Dec (CurLine)
|
Dec (CurLine);
|
||||||
End;
|
|
||||||
UpdateCursor;
|
UpdateCursor;
|
||||||
End;
|
End;
|
||||||
|
End;
|
||||||
#73 : Begin
|
#73 : Begin
|
||||||
If TopPage - WinSize > 0 Then Begin
|
If TopPage - WinSize > 0 Then Begin
|
||||||
Dec (TopPage, WinSize);
|
Dec (TopPage, WinSize);
|
||||||
Dec (CurLine, WinSize);
|
|
||||||
End Else Begin
|
|
||||||
TopPage := 1;
|
|
||||||
CurLine := 1;
|
|
||||||
End;
|
|
||||||
DrawPage;
|
DrawPage;
|
||||||
UpdateCursor;
|
UpdateCursor;
|
||||||
|
// Dec (CurLine, WinSize);
|
||||||
|
End Else If TopPage > 1 Then Begin
|
||||||
|
TopPage := 1;
|
||||||
|
CurLine := 1;
|
||||||
|
DrawPage;
|
||||||
|
UpdateCursor;
|
||||||
|
End;
|
||||||
End;
|
End;
|
||||||
#75 : If (CurLPos > 1) and (Text[TopPage + CurLine - 1].Links > 0) Then Begin
|
#75 : If (CurLPos > 1) and (Text[TopPage + CurLine - 1].Links > 0) Then Begin
|
||||||
LinkOFF(TopPage + CurLine - 1, CurLine + 1, CurLPos);
|
LinkOFF(TopPage + CurLine - 1, CurLine + 1, CurLPos);
|
||||||
|
@ -361,13 +364,14 @@ Begin
|
||||||
If (CurLine = WinSize) and (TopPage + WinSize <= Lines) Then Begin
|
If (CurLine = WinSize) and (TopPage + WinSize <= Lines) Then Begin
|
||||||
Inc(TopPage);
|
Inc(TopPage);
|
||||||
DrawPage;
|
DrawPage;
|
||||||
|
UpdateCursor;
|
||||||
End Else
|
End Else
|
||||||
If (CurLine < WinSize) And (TopPage + CurLine <= Lines) Then Begin
|
If (CurLine < WinSize) And (TopPage + CurLine <= Lines) Then Begin
|
||||||
LinkOFF(TopPage + CurLine - 1, CurLine + 1, CurLPos);
|
LinkOFF(TopPage + CurLine - 1, CurLine + 1, CurLPos);
|
||||||
Inc(CurLine);
|
Inc(CurLine);
|
||||||
End;
|
|
||||||
UpdateCursor;
|
UpdateCursor;
|
||||||
End;
|
End;
|
||||||
|
End;
|
||||||
#81 : Begin
|
#81 : Begin
|
||||||
PageDown;
|
PageDown;
|
||||||
DrawPage;
|
DrawPage;
|
||||||
|
|
Loading…
Reference in New Issue