aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src/display
diff options
context:
space:
mode:
authorChristian Duerr <contact@christianduerr.com>2021-04-15 22:16:31 +0000
committerGitHub <noreply@github.com>2021-04-15 22:16:31 +0000
commit9cb55621f77a8eeca3738013ef9b1274b7a97e96 (patch)
tree4ccd2f192ee230af1c0e52dcd6614f9ac80d4f37 /alacritty/src/display
parent1f46bb7b925e5a6ce2dc4e5eeb88449d4cb8ebc5 (diff)
downloadr-alacritty-9cb55621f77a8eeca3738013ef9b1274b7a97e96.tar.gz
r-alacritty-9cb55621f77a8eeca3738013ef9b1274b7a97e96.tar.bz2
r-alacritty-9cb55621f77a8eeca3738013ef9b1274b7a97e96.zip
Fix mouse point crash on resize
This resolves an issue with Alacritty crashing after a resize, due to the last cached mouse point being out of bounds. Instead of caching the mouse point, it is now computed on demand to make sure it can never be invalid. Fixes #4977.
Diffstat (limited to 'alacritty/src/display')
-rw-r--r--alacritty/src/display/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/alacritty/src/display/mod.rs b/alacritty/src/display/mod.rs
index 6e40e35c..810d20f3 100644
--- a/alacritty/src/display/mod.rs
+++ b/alacritty/src/display/mod.rs
@@ -680,7 +680,7 @@ impl Display {
}
// Find highlighted hint at mouse position.
- let point = viewport_to_point(term.grid().display_offset(), mouse.point);
+ let point = mouse.point(&self.size_info, term.grid().display_offset());
let highlighted_hint = hint::highlighted_at(&term, config, point, modifiers);
// Update cursor shape.