aboutsummaryrefslogtreecommitdiff
path: root/src/ui.cc
diff options
context:
space:
mode:
authorRodrigo Arias Mallo <rodarima@gmail.com>2025-05-20 23:34:25 +0200
committerRodrigo Arias Mallo <rodarima@gmail.com>2025-05-20 23:34:25 +0200
commitbd0c912a80a72f2c9a1701e510e53d3e2771247c (patch)
tree1c527d0ec065ca4601d979d6750f7b226d7bb05a /src/ui.cc
parente8be369aa93f535519d6f63db324571286a8996b (diff)
Make Ctrl+A select input text
The Emacs shortcut was overriding the FLTK behavior of selecting all input text. Fixes: https://github.com/dillo-browser/dillo/issues/400
Diffstat (limited to 'src/ui.cc')
-rw-r--r--src/ui.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ui.cc b/src/ui.cc
index effd76cf..30e0a2d5 100644
--- a/src/ui.cc
+++ b/src/ui.cc
@@ -127,8 +127,8 @@ int CustInput::handle(int e)
return 0;
}
} else if (modifier == FL_CTRL) {
- if (k == 'a' || k == 'e') {
- position(k == 'a' ? 0 : size());
+ if (k == 'e') {
+ position(size());
return 1;
} else if (k == 'k') {
cut(position(), size());
@@ -136,7 +136,7 @@ int CustInput::handle(int e)
} else if (k == 'd') {
cut(position(), position()+1);
return 1;
- } else if (k == 'l') {
+ } else if (k == 'a' || k == 'l') {
// Make text selected when already focused.
position(size(), 0);
return 1;