aboutsummaryrefslogtreecommitdiff
path: root/search.c
diff options
context:
space:
mode:
Diffstat (limited to 'search.c')
-rw-r--r--search.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/search.c b/search.c
index eaf8c34e..bcb354d6 100644
--- a/search.c
+++ b/search.c
@@ -1388,11 +1388,14 @@ search_input(struct seat *seat, struct terminal *term,
bool update_search_result = false;
bool redraw = false;
- /* Key bindings */
+ /*
+ * Key bindings
+ */
+
+ /* Match translated symbol */
tll_foreach(bindings->search, it) {
const struct key_binding *bind = &it->item;
- /* Match translated symbol */
if (bind->k.sym == sym &&
bind->mods == (mods & ~consumed)) {
@@ -1404,11 +1407,15 @@ search_input(struct seat *seat, struct terminal *term,
}
return;
}
+ }
+
+ /* Match untranslated symbols */
+ tll_foreach(bindings->search, it) {
+ const struct key_binding *bind = &it->item;
if (bind->mods != mods)
continue;
- /* Match untranslated symbols */
for (size_t i = 0; i < raw_count; i++) {
if (bind->k.sym == raw_syms[i]) {
if (execute_binding(seat, term, bind, serial,
@@ -1420,8 +1427,15 @@ search_input(struct seat *seat, struct terminal *term,
return;
}
}
+ }
+
+ /* Match raw key code */
+ tll_foreach(bindings->search, it) {
+ const struct key_binding *bind = &it->item;
+
+ if (bind->mods != mods)
+ continue;
- /* Match raw key code */
tll_foreach(bind->k.key_codes, code) {
if (code->item == key) {
if (execute_binding(seat, term, bind, serial,