summaryrefslogtreecommitdiff
path: root/examples/apps/ide
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2011-08-29 22:03:56 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2011-08-29 22:19:03 +0200
commitc23e6d69fd69f5bceeecc8b1fc218298fb66d3bb (patch)
treedd25d3ce88abaf75455d07cc22d5bdce09676773 /examples/apps/ide
parent96520360b9f53c82600164207a56d23866a750da (diff)
downloadfpGUI-c23e6d69fd69f5bceeecc8b1fc218298fb66d3bb.tar.xz
textedit: moved selection + backspace code into the keyBackspace block
Diffstat (limited to 'examples/apps/ide')
-rw-r--r--examples/apps/ide/src/fpg_textedit.pas12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/apps/ide/src/fpg_textedit.pas b/examples/apps/ide/src/fpg_textedit.pas
index 360c6164..27edbfa7 100644
--- a/examples/apps/ide/src/fpg_textedit.pas
+++ b/examples/apps/ide/src/fpg_textedit.pas
@@ -1341,17 +1341,17 @@ begin
// if (keycode = keyEscape) or (ssCtrl in ShiftState) then
// Exit; //==>
- if FSelected then
- begin
- DeleteSelection;
- if keycode = keyBackSpace then
- Exit; //==>
- end;
SLine := FLines[CaretPos.Y];
case keycode of
keyBackspace:
begin
+ if FSelected then
+ begin
+ DeleteSelection;
+ consumed := True;
+ Exit;
+ end;
if UTF8Length(SLine) >= CaretPos.X then
X := CaretPos.X
else