summaryrefslogtreecommitdiff
path: root/examples/apps/ide
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@gmail.com>2013-03-15 14:50:32 +0000
committerGraeme Geldenhuys <graemeg@gmail.com>2013-03-15 15:08:38 +0000
commitc5241ae83570635083d4157b474d2f0b6ff7bd57 (patch)
tree4223f6cd455d83313b76789ff0d853c0e321b82c /examples/apps/ide
parent709941315130cfe089dc11811d113ac8a8c02dcb (diff)
downloadfpGUI-c5241ae83570635083d4157b474d2f0b6ff7bd57.tar.xz
textedit: correctly named an identifier based on its usage
Diffstat (limited to 'examples/apps/ide')
-rw-r--r--examples/apps/ide/src/fpg_textedit.pas10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/apps/ide/src/fpg_textedit.pas b/examples/apps/ide/src/fpg_textedit.pas
index 9f456d66..c6236cfc 100644
--- a/examples/apps/ide/src/fpg_textedit.pas
+++ b/examples/apps/ide/src/fpg_textedit.pas
@@ -666,7 +666,7 @@ end;
to set selection if Shift key is pressed. }
procedure TfpgBaseTextEdit.KeyboardCaretNav(const ShiftState: TShiftState; const AKeyCode: Word);
var
- SaveXCaret: Integer;
+ SaveYCaretOffset: Integer;
procedure CtrlKeyLeftKey;
var
@@ -1052,7 +1052,7 @@ begin
FSelStartNo := CaretPos.Y;
FSelStartOffs := CaretPos.X;
end;
- SaveXCaret := CaretPos.Y - FTopLine;
+ SaveYCaretOffset := CaretPos.Y - FTopLine;
if AKeyCode = keyPageUp then
begin
if VPos = 0 then
@@ -1066,11 +1066,11 @@ begin
if FVScrollBar.Visible then
FVScrollBar.PageUp;
// restore caret at same line offset as before
- CaretPos.Y := FTopLine + SaveXCaret;
+ CaretPos.Y := FTopLine + SaveYCaretOffset;
end;
end
else
- begin
+ begin { PageDown handling }
if VPos > (FLines.Count - FVisLines) then
begin
CaretPos.Y := FLines.Count-1;
@@ -1082,7 +1082,7 @@ begin
if FVScrollBar.Visible then
FVScrollBar.PageDown;
// restore caret at same line offset as before
- CaretPos.Y := FTopLine + SaveXCaret;
+ CaretPos.Y := FTopLine + SaveYCaretOffset;
end;
end;
if ssShift in ShiftState then