From 390bff3435e571e3a2ed81004aae74e0c5851218 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 27 Mar 2024 19:07:09 +1100 Subject: [PATCH] Do not make cursor visible when not dragging Fixes #5130 --- src/input_handler.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/input_handler.cc b/src/input_handler.cc index b4bb32a47..585d34988 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -161,7 +161,10 @@ struct MouseHandler case Key::Modifiers::MouseRelease: { if (not m_dragging) + { + context.ensure_cursor_visible = false; return true; + } auto& selections = context.selections(); cursor = context.window().buffer_coord(key.coord()); selections.main() = {buffer.clamp(m_anchor), cursor}; @@ -172,7 +175,10 @@ struct MouseHandler case Key::Modifiers::MousePos: { if (not m_dragging) + { + context.ensure_cursor_visible = false; return true; + } cursor = context.window().buffer_coord(key.coord()); auto& selections = context.selections(); selections.main() = {buffer.clamp(m_anchor), cursor};