summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@gmail.com>2015-03-01 18:41:22 +0000
committerGraeme Geldenhuys <graemeg@gmail.com>2015-03-01 18:41:22 +0000
commit8dfc12915479cb72117d5a07f6dbe209c025a541 (patch)
tree300f9ad9c92ec3a45a876d3dcc169961cc225257
parent6c692d963dcfe14d2f0f86da064605c7f66325d8 (diff)
downloadfpGUI-8dfc12915479cb72117d5a07f6dbe209c025a541.tar.xz
bug: fixes deleting extra character after Cut-To-Clipboard it TextEdit widget
Using the keyboard combination to cut to the clipboard deleted an extra character that was not selected.
-rw-r--r--examples/apps/ide/src/fpg_textedit.pas8
1 files changed, 7 insertions, 1 deletions
diff --git a/examples/apps/ide/src/fpg_textedit.pas b/examples/apps/ide/src/fpg_textedit.pas
index 3e88f3d1..6acea537 100644
--- a/examples/apps/ide/src/fpg_textedit.pas
+++ b/examples/apps/ide/src/fpg_textedit.pas
@@ -1583,17 +1583,20 @@ begin
ckCopy:
begin
CopyToClipboard;
+ consumed := True;
end;
ckPaste:
begin
// if not ReadOnly then
PasteFromClipboard;
+ consumed := True;
end;
ckCut:
begin
CutToClipboard;
+ consumed := True;
end;
end;
@@ -1611,6 +1614,8 @@ begin
SLine := FLines[CaretPos.Y];
+ if not consumed then
+ begin
case keycode of
keyBackspace:
begin
@@ -1728,7 +1733,8 @@ begin
end;
consumed := True;
end;
- end;
+ end; // case keycode
+ end; // if not consumed
if CaretScroll then
begin