mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-22 01:40:17 -05:00
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
This commit is contained in:
parent
0062f4e133
commit
501a9fbb5e
8 changed files with 37 additions and 11 deletions
10
input.c
10
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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue