aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src
diff options
context:
space:
mode:
authorChristian Duerr <contact@christianduerr.com>2020-02-07 06:50:18 +0000
committerGitHub <noreply@github.com>2020-02-07 09:50:18 +0300
commit6832b86aa7a9adb386394e1caaf373e65297be4e (patch)
treeb320ab78e8ad64305dee6e765799c4f7d0de7dce /alacritty/src
parentcbec5e415b721e5d5a8359ebed247ac39eb99721 (diff)
downloadr-alacritty-6832b86aa7a9adb386394e1caaf373e65297be4e.tar.gz
r-alacritty-6832b86aa7a9adb386394e1caaf373e65297be4e.tar.bz2
r-alacritty-6832b86aa7a9adb386394e1caaf373e65297be4e.zip
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.
Diffstat (limited to 'alacritty/src')
-rw-r--r--alacritty/src/url.rs4
1 files changed, 2 insertions, 2 deletions
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();
}