From 550ae40ff5a0dac472d88cd657e27450f7b7d105 Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Mon, 26 Sep 2022 16:36:08 -0700 Subject: [PATCH] Slightly improved left click handling --- crates/terminal/src/terminal.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/crates/terminal/src/terminal.rs b/crates/terminal/src/terminal.rs index 56617001cf..0a518d2b15 100644 --- a/crates/terminal/src/terminal.rs +++ b/crates/terminal/src/terminal.rs @@ -1015,8 +1015,7 @@ impl Terminal { pub fn left_click(&mut self, e: &ClickRegionEvent, origin: Vector2F) { let position = e.position.sub(origin); if !self.mouse_mode(e.shift) { - if self.last_content.last_hovered_hyperlink.is_some() - && self.last_content.selection.is_none() + //Hyperlinks { let mouse_cell_index = content_index_for_mouse(position, &self.last_content); if let Some(link) = self.last_content.cells[mouse_cell_index].hyperlink() { @@ -1025,7 +1024,10 @@ impl Terminal { self.events .push_back(InternalEvent::Hyperlink(position, true)); } - } else { + } + + // Selections + { let point = grid_point( position, self.last_content.size,