Efficient updates and bugfixes

This commit is contained in:
mysticbbs 2012-02-15 00:28:26 -05:00
parent 4ba81de29b
commit fbf1e65dbe
1 changed files with 13 additions and 9 deletions

View File

@ -240,9 +240,9 @@ Var
If Lines > WinSize Then Begin
If TopPage + WinSize <= Lines - WinSize Then Begin
Inc (TopPage, WinSize);
Inc (CurLine, WinSize);
// Inc (CurLine, WinSize);
End Else Begin
TopPage := Lines - WinSize - 1;
TopPage := Lines - WinSize + 1; //was - 1
CurLine := WinSize;
End;
End Else
@ -323,22 +323,25 @@ Begin
If (CurLine = 1) and (TopPage > 1) Then Begin
Dec (TopPage);
DrawPage;
UpdateCursor;
End Else If CurLine > 1 Then Begin
LinkOFF(TopPage + CurLine - 1, CurLine + 1, CurLPos);
Dec (CurLine)
End;
Dec (CurLine);
UpdateCursor;
End;
End;
#73 : Begin
If TopPage - WinSize > 0 Then Begin
Dec (TopPage, WinSize);
Dec (CurLine, WinSize);
End Else Begin
TopPage := 1;
CurLine := 1;
End;
DrawPage;
UpdateCursor;
// Dec (CurLine, WinSize);
End Else If TopPage > 1 Then Begin
TopPage := 1;
CurLine := 1;
DrawPage;
UpdateCursor;
End;
End;
#75 : If (CurLPos > 1) and (Text[TopPage + CurLine - 1].Links > 0) Then Begin
LinkOFF(TopPage + CurLine - 1, CurLine + 1, CurLPos);
@ -361,13 +364,14 @@ Begin
If (CurLine = WinSize) and (TopPage + WinSize <= Lines) Then Begin
Inc(TopPage);
DrawPage;
UpdateCursor;
End Else
If (CurLine < WinSize) And (TopPage + CurLine <= Lines) Then Begin
LinkOFF(TopPage + CurLine - 1, CurLine + 1, CurLPos);
Inc(CurLine);
End;
UpdateCursor;
End;
End;
#81 : Begin
PageDown;
DrawPage;