aboutsummaryrefslogtreecommitdiff
path: root/input.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2022-03-22 18:07:06 +0000
committerDaniel Eklöf <daniel@ekloef.se>2022-04-17 09:24:27 +0000
commit501a9fbb5e1ec09c26cf61c464cf5b4ae6dba28a (patch)
treeb14ea152b7d8a93d3533c31c1024cdb059fe2b80 /input.c
parentchangelog: scrollback search mode highlights all matches (diff)
url-mode: add a key binding that enables “persistent” URL mode
This is an alternative to ‘show-urls-launch’, where we stay in URL mode after activating an URL. Closes #964
Diffstat (limited to 'input.c')
-rw-r--r--input.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/input.c b/input.c
index 29ac80ae..403ee965 100644
--- a/input.c
+++ b/input.c
@@ -314,12 +314,14 @@ execute_binding(struct seat *seat, struct terminal *term,
}
case BIND_ACTION_SHOW_URLS_COPY:
- case BIND_ACTION_SHOW_URLS_LAUNCH: {
+ case BIND_ACTION_SHOW_URLS_LAUNCH:
+ case BIND_ACTION_SHOW_URLS_PERSISTENT: {
xassert(!urls_mode_is_active(term));
- enum url_action url_action = action == BIND_ACTION_SHOW_URLS_COPY
- ? URL_ACTION_COPY
- : URL_ACTION_LAUNCH;
+ enum url_action url_action =
+ action == BIND_ACTION_SHOW_URLS_COPY ? URL_ACTION_COPY :
+ action == BIND_ACTION_SHOW_URLS_LAUNCH ? URL_ACTION_LAUNCH :
+ URL_ACTION_PERSISTENT;
urls_collect(term, url_action, &term->urls);
urls_assign_key_combos(term->conf, &term->urls);