aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-07-22 15:51:27 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-07-22 15:51:27 +0000
commitac7b229f7cb83535765597519888c3e4a27215d3 (patch)
tree2bea30762038013ce0d233ddf968e38cbb65e07a
parentreadme: 'special thanks' -> 'credits' (diff)
search: re-enable search-commit action
This was disabled while implementing multi-seat support, and I forgot to fix and re-enable before that feature was merged.
-rw-r--r--search.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/search.c b/search.c
index 17b1a05e..7786937a 100644
--- a/search.c
+++ b/search.c
@@ -412,8 +412,8 @@ distance_prev_word(const struct terminal *term)
}
static bool
-execute_binding(struct terminal *term, enum bind_action_search action,
- uint32_t serial)
+execute_binding(struct seat *seat, struct terminal *term,
+ enum bind_action_search action, uint32_t serial)
{
switch (action) {
case BIND_ACTION_SEARCH_NONE:
@@ -429,10 +429,8 @@ execute_binding(struct terminal *term, enum bind_action_search action,
return true;
case BIND_ACTION_SEARCH_COMMIT:
-#if 0
- selection_finalize(term, term->wl->input_serial);
+ selection_finalize(seat, term, serial);
search_cancel_keep_selection(term);
-#endif
return true;
case BIND_ACTION_SEARCH_FIND_PREV:
@@ -584,7 +582,7 @@ search_input(struct seat *seat, struct terminal *term, uint32_t key,
/* Match symbol */
if (it->item.bind.sym == sym) {
- if (!execute_binding(term, it->item.action, serial))
+ if (!execute_binding(seat, term, it->item.action, serial))
goto update_search;
return;
}
@@ -592,7 +590,7 @@ search_input(struct seat *seat, struct terminal *term, uint32_t key,
/* Match raw key code */
tll_foreach(it->item.bind.key_codes, code) {
if (code->item == key) {
- if (!execute_binding(term, it->item.action, serial))
+ if (!execute_binding(seat, term, it->item.action, serial))
goto update_search;
return;
}