From e1892ee92ab6c826787e19c7d55de3f4b40e16a8 Mon Sep 17 00:00:00 2001 From: Kirill Chibisov Date: Sun, 4 Aug 2019 19:01:08 +0300 Subject: [PATCH] Fix crash when hovering over message bar This commit fixes a regression introduced in 9dddf64. Fixes #2699. --- alacritty_terminal/src/input.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alacritty_terminal/src/input.rs b/alacritty_terminal/src/input.rs index 3cf6247..7e87054 100644 --- a/alacritty_terminal/src/input.rs +++ b/alacritty_terminal/src/input.rs @@ -393,7 +393,6 @@ impl<'a, A: ActionContext + 'a> Processor<'a, A> { let mouse_mode = TermMode::MOUSE_MOTION | TermMode::MOUSE_DRAG | TermMode::MOUSE_REPORT_CLICK; - let buffer_point = self.ctx.terminal().visible_to_buffer(point); // Check message bar before URL to ignore URLs in the message bar if let Some(message) = self.message_at_point(Some(point)) { @@ -409,6 +408,7 @@ impl<'a, A: ActionContext + 'a> Processor<'a, A> { && (!self.ctx.terminal().mode().intersects(mouse_mode) || modifiers.shift) && self.mouse_config.url.launcher.is_some() { + let buffer_point = self.ctx.terminal().visible_to_buffer(point); if let Some(url) = self.ctx.terminal().urls().drain(..).find(|url| url.contains(buffer_point)) {