diff options
author | jcid <devnull@localhost> | 2008-10-02 16:57:58 +0200 |
---|---|---|
committer | jcid <devnull@localhost> | 2008-10-02 16:57:58 +0200 |
commit | 476f5e74c2a93b7893a44c34f5cd1e953242ea33 (patch) | |
tree | 7d6063a1d6e4ba4cc2823fcff3be99fba4116e54 /src/findbar.cc | |
parent | ea461615f2b4a0a693aacd96435216b1dd2d53f9 (diff) |
- Made SHIFT + {Left, Right} work even with findbar focused.
Diffstat (limited to 'src/findbar.cc')
-rw-r--r-- | src/findbar.cc | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/findbar.cc b/src/findbar.cc index 606fe7af..144818e3 100644 --- a/src/findbar.cc +++ b/src/findbar.cc @@ -34,12 +34,19 @@ int MyInput::handle(int e) _MSG("findbar MyInput::handle()\n"); int ret = 1, k = event_key(); unsigned modifier = event_state() & (SHIFT | CTRL | ALT | META); - if (modifier == 0) { - if (e == KEY && k == EscapeKey) { - _MSG("findbar MyInput: caught EscapeKey\n"); - ret = 0; + + if (e == KEY) { + if (k == LeftKey || k == RightKey) { + if (modifier == SHIFT) { + a_UIcmd_send_event_to_tabs_by_wid(e, this); + return 1; + } + } else if (k == EscapeKey && modifier == 0) { + // Avoid clearing the text with Esc, just hide the findbar. + return 0; } } + if (ret) ret = Input::handle(e); return ret; |