aboutsummaryrefslogtreecommitdiff
path: root/url-mode.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2022-02-08 18:43:00 +0000
committerDaniel Eklöf <daniel@ekloef.se>2022-02-09 16:51:05 +0000
commitfed90646d3b8fdd99d2811ecc1c9745b86fa051a (patch)
treeaf818ce48fcd92fcf1f83c68ddd846295a1cd6b1 /url-mode.c
parentconfig: ‘pipe’ is now optional ‘aux’ data in the key-binding struct (diff)
input/search/url: pass pointer-to key-binding struct to execute()
Diffstat (limited to 'url-mode.c')
-rw-r--r--url-mode.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/url-mode.c b/url-mode.c
index 22cb3359..350bdf25 100644
--- a/url-mode.c
+++ b/url-mode.c
@@ -25,8 +25,10 @@ static void url_destroy(struct url *url);
static bool
execute_binding(struct seat *seat, struct terminal *term,
- enum bind_action_url action, uint32_t serial)
+ const struct key_binding *binding, uint32_t serial)
{
+ const enum bind_action_url action = binding->action;
+
switch (action) {
case BIND_ACTION_URL_NONE:
return false;
@@ -128,7 +130,7 @@ urls_input(struct seat *seat, struct terminal *term, uint32_t key,
if (bind->k.sym == sym &&
bind->mods == (mods & ~consumed))
{
- execute_binding(seat, term, bind->action, serial);
+ execute_binding(seat, term, bind, serial);
return;
}
@@ -137,7 +139,7 @@ urls_input(struct seat *seat, struct terminal *term, uint32_t key,
for (size_t i = 0; i < raw_count; i++) {
if (bind->k.sym == raw_syms[i]) {
- execute_binding(seat, term, bind->action, serial);
+ execute_binding(seat, term, bind, serial);
return;
}
}
@@ -145,7 +147,7 @@ urls_input(struct seat *seat, struct terminal *term, uint32_t key,
/* Match raw key code */
tll_foreach(bind->k.key_codes, code) {
if (code->item == key) {
- execute_binding(seat, term, bind->action, serial);
+ execute_binding(seat, term, bind, serial);
return;
}
}