diff options
author | Christian Duerr <contact@christianduerr.com> | 2024-10-29 04:02:42 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-29 07:02:42 +0300 |
commit | 0542d9f4f57a8b052234bf8b15d44aef8f90c00a (patch) | |
tree | 3b62f1ae9b289a3bc577f281d3c37cad14180dff /alacritty/src/display/damage.rs | |
parent | c2782ad619613d79be453abba6bd58ba98cfe239 (diff) | |
download | r-alacritty-0542d9f4f57a8b052234bf8b15d44aef8f90c00a.tar.gz r-alacritty-0542d9f4f57a8b052234bf8b15d44aef8f90c00a.tar.bz2 r-alacritty-0542d9f4f57a8b052234bf8b15d44aef8f90c00a.zip |
Fix hint highlight invalidation
This fixes a couple issues with hint highlight invalidation, which would
cause hints to lose their underline highlight despite the terminal
itself not having changed since the highlight started.
Closes #8270.
Diffstat (limited to 'alacritty/src/display/damage.rs')
-rw-r--r-- | alacritty/src/display/damage.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/alacritty/src/display/damage.rs b/alacritty/src/display/damage.rs index 8efe0133..fc6aef39 100644 --- a/alacritty/src/display/damage.rs +++ b/alacritty/src/display/damage.rs @@ -193,9 +193,11 @@ impl FrameDamage { /// Check if a range is damaged. #[inline] pub fn intersects(&self, start: Point<usize>, end: Point<usize>) -> bool { + let start_line = &self.lines[start.line]; + let end_line = &self.lines[end.line]; self.full - || self.lines[start.line].left <= start.column - || self.lines[end.line].right >= end.column + || (start_line.left..=start_line.right).contains(&start.column) + || (end_line.left..=end_line.right).contains(&end.column) || (start.line + 1..end.line).any(|line| self.lines[line].is_damaged()) } } |