mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-26 01:40:12 -05:00
urls: initial support for detecting URLs and rendering jump-labels
The jump labels work, but is currently hardcoded to use xdg-open
This commit is contained in:
parent
b255aea3ed
commit
2cc84db979
12 changed files with 503 additions and 28 deletions
13
input.c
13
input.c
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue