summaryrefslogtreecommitdiff
path: root/examples/apps/ide/src
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@gmail.com>2013-03-15 14:48:45 +0000
committerGraeme Geldenhuys <graemeg@gmail.com>2013-03-15 15:08:38 +0000
commit61533659afd28fdcb47ccf11e521c4bbf1061dc6 (patch)
tree741ee860e614359d44353d58a4693639a72b287f /examples/apps/ide/src
parent350e85c64e3ea2cb56e0a2a2454bb13d36a3e39a (diff)
downloadfpGUI-61533659afd28fdcb47ccf11e521c4bbf1061dc6.tar.xz
textedit: Ctrl+Home/End handling is now fixed.
Old behaviour took you to the correct location, but the vertical scrollbar position was never updated. So if you then did a PgUp/PgDn or a Mouse Wheel Scroll, you suddenly jumped to a different location in the source code.
Diffstat (limited to 'examples/apps/ide/src')
-rw-r--r--examples/apps/ide/src/fpg_textedit.pas6
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/apps/ide/src/fpg_textedit.pas b/examples/apps/ide/src/fpg_textedit.pas
index b68c78b3..86f4f6fb 100644
--- a/examples/apps/ide/src/fpg_textedit.pas
+++ b/examples/apps/ide/src/fpg_textedit.pas
@@ -1,7 +1,7 @@
{
fpGUI - Free Pascal GUI Toolkit
- Copyright (C) 2006 - 2010 See the file AUTHORS.txt, included in this
+ Copyright (C) 2006 - 2013 See the file AUTHORS.txt, included in this
distribution, for details of the copyright.
See the file COPYING.modifiedLGPL, included in this distribution,
@@ -971,6 +971,8 @@ begin
CaretPos.Y := 0;
CaretPos.X := 0;
end;
+ ScrollPos_V := 0;
+ UpdateScrollBars;
Exit;
end;
if ssShift in ShiftState then
@@ -1017,6 +1019,8 @@ begin
CaretPos.Y := pred(FLines.Count);
CaretPos.X := Length(FLines[CaretPos.Y]);
end;
+ ScrollPos_V := CaretPos.Y - FVisLines;
+ UpdateScrollBars;
Exit;
end;
if ssShift in ShiftState then