From 91aa683bcd060b2ac2f621a388a6448f564d0537 Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Sat, 30 Mar 2019 09:23:48 +0000 Subject: Rework URL highlighting This completely reworks URL highlighting to fix two issues which were caused by the original approach. The primary issues that were not straight-forward to resolve with the previous implementation were about handling the URL highlighted content moving while the highlight is active. This lead to issues with highlighting with scrolling and when the display offset was not 0. The new approach sticks closely to prior art done for the selection, where the selection is tracked on the grid and updated whenever the buffer is rotated. The truncation of URLs was incorrectly assuming input to be just a single codepoint wide to truncate the end of URLs with unmatching closing parenthesis. This is now handled properly using Rust's built-in Unicode support. This fixes #2231. This fixes #2225. --- src/event.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/event.rs') diff --git a/src/event.rs b/src/event.rs index 121c0c42..f7d9f225 100644 --- a/src/event.rs +++ b/src/event.rs @@ -432,6 +432,7 @@ impl Processor { processor.ctx.terminal.dirty = true; processor.ctx.terminal.next_is_urgent = Some(false); } else { + processor.ctx.terminal.reset_url_highlight(); processor.ctx.terminal.dirty = true; *hide_mouse = false; } -- cgit