From 6726494f4c2836a5ed1c4611c181e4a57a4adbf1 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sat, 6 Feb 2021 11:47:59 +0100 Subject: url-mode: store absolute row numbers in start/end coordinates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows us to update the jump label positions when the viewport changes. This in turn allows us to stay in URL mode while the user is using the mouse to scroll in the scrollback history. Scrolling with the keyboard is currently not possible, since input handling in URL mode does not recognize “regular” key bindings. We _could_ add scrollback up/down bindings to URL mode too, but lets not, for the time being. (Note: an alternative to this patch is to disallow mouse scrolling too. Then we could have kept the URL start/end as viewport local coordinates). --- commands.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'commands.c') diff --git a/commands.c b/commands.c index ac91ab19..01ad4e1e 100644 --- a/commands.c +++ b/commands.c @@ -83,6 +83,7 @@ cmd_scrollback_up(struct terminal *term, int rows) } else term_damage_view(term); + render_refresh_urls(term); render_refresh(term); } @@ -157,5 +158,6 @@ cmd_scrollback_down(struct terminal *term, int rows) } else term_damage_view(term); + render_refresh_urls(term); render_refresh(term); } -- cgit v1.3