From 6832b86aa7a9adb386394e1caaf373e65297be4e Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Fri, 7 Feb 2020 06:50:18 +0000 Subject: Fix selection expansion across full-width glyphs Instead of trying to expand the start and end of a selection across full-width glyphs, the selection should now only go from its origin to the end without any kind of expansion. Instead, the expansion is now done where the cells are actually checked for their selection status, expanding across the entire full-width glyph whenever any part of it is selected. Fixes #3106. --- alacritty/src/url.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'alacritty/src') diff --git a/alacritty/src/url.rs b/alacritty/src/url.rs index 1840c22c..e538331d 100644 --- a/alacritty/src/url.rs +++ b/alacritty/src/url.rs @@ -42,7 +42,7 @@ impl Url { } pub fn end(&self) -> Point { - self.lines[self.lines.len() - 1].end.sub(self.num_cols, self.end_offset as usize, false) + self.lines[self.lines.len() - 1].end.sub(self.num_cols, self.end_offset as usize) } } @@ -83,7 +83,7 @@ impl Urls { let end = point; // Reset URL when empty cells have been skipped - if point != Point::default() && Some(point.sub(num_cols, 1, false)) != self.last_point { + if point != Point::default() && Some(point.sub(num_cols, 1)) != self.last_point { self.reset(); } -- cgit