diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-01-31 10:12:07 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-02-07 15:33:31 +0000 |
| commit | 2cc84db97978388475504592c88911046bcd2eb6 (patch) | |
| tree | 91efd350b53a6b296c0e78eb5781ef0e59cdddbf /input.c | |
| parent | config: free URL bindings (diff) | |
urls: initial support for detecting URLs and rendering jump-labels
The jump labels work, but is currently hardcoded to use xdg-open
Diffstat (limited to 'input.c')
| -rw-r--r-- | input.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -34,6 +34,7 @@ #include "spawn.h" #include "terminal.h" #include "tokenize.h" +#include "url-mode.h" #include "util.h" #include "vt.h" #include "xmalloc.h" @@ -272,8 +273,11 @@ execute_binding(struct seat *seat, struct terminal *term, } case BIND_ACTION_SHOW_URLS: - assert(false); - break; + xassert(!urls_mode_is_active(term)); + + urls_collect(term); + render_refresh_urls(term); + return true; case BIND_ACTION_SELECT_BEGIN: selection_start( @@ -854,6 +858,11 @@ key_press_release(struct seat *seat, struct terminal *term, uint32_t serial, start_repeater(seat, key); search_input(seat, term, key, sym, effective_mods, serial); return; + } else if (urls_mode_is_active(term)) { + if (should_repeat) + start_repeater(seat, key); + urls_input(seat, term, key, sym, effective_mods, serial); + return; } #if 0 |
