summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2010-03-25 13:06:13 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2010-03-25 13:06:13 +0200
commitc0638111c5ef4ce8aae94c183a257ac2212ec7cd (patch)
tree859c67d39cdfebb1bcc6cc1760da58f89bfa1600
parent9e42dee924c18f1ce6cdb3e49abf97b8b5c8759a (diff)
downloadfpGUI-c0638111c5ef4ce8aae94c183a257ac2212ec7cd.tar.xz
Minor tweak to TfpgEdit to unselect text when right arrow key is pressed.
When the component gets focus and autoselect is enabled, if you pressed the right arrow it did not unselect the text, but the left arrow did. This is now fixed.
-rw-r--r--src/gui/fpg_edit.pas20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/gui/fpg_edit.pas b/src/gui/fpg_edit.pas
index b4fe91a2..f82bbf1f 100644
--- a/src/gui/fpg_edit.pas
+++ b/src/gui/fpg_edit.pas
@@ -799,18 +799,20 @@ begin
end;
keyRight:
- if FCursorPos < UTF8Length(FText) then
begin
consumed := True;
- Inc(FCursorPos);
+ if FCursorPos < UTF8Length(FText) then
+ begin
+ Inc(FCursorPos);
- if (ssCtrl in shiftstate) then
- // word search...
- // while (FCursorPos < Length(FText)) and ptkIsAlphaNum(copy(FText,FCursorPos+1,1))
- // do Inc(FCursorPos);
- // while (FCursorPos < Length(FText)) and not ptkIsAlphaNum(copy(FText,FCursorPos+1,1))
- // do Inc(FCursorPos);
- ;
+ if (ssCtrl in shiftstate) then
+ // word search...
+ // while (FCursorPos < Length(FText)) and ptkIsAlphaNum(copy(FText,FCursorPos+1,1))
+ // do Inc(FCursorPos);
+ // while (FCursorPos < Length(FText)) and not ptkIsAlphaNum(copy(FText,FCursorPos+1,1))
+ // do Inc(FCursorPos);
+ ;
+ end;
end;
keyHome: