From 9cb55621f77a8eeca3738013ef9b1274b7a97e96 Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Thu, 15 Apr 2021 22:16:31 +0000 Subject: 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. --- alacritty/src/display/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'alacritty/src/display') 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. -- cgit