diff options
author | Graeme Geldenhuys <graemeg@gmail.com> | 2013-03-15 14:48:45 +0000 |
---|---|---|
committer | David Laurence Emerson <dle3ab@angelbase.com> | 2013-05-28 00:42:47 -0700 |
commit | 1954c8fd6d154066e988dc11bda51099929d941f (patch) | |
tree | 793160e9a79f919d0ea69cce884c44dabaa13247 /examples | |
parent | 6c32c2b218a95197db24d1a99d0775aa4cc21cea (diff) | |
download | fpGUI-1954c8fd6d154066e988dc11bda51099929d941f.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')
-rw-r--r-- | examples/apps/ide/src/fpg_textedit.pas | 6 |
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 |