summaryrefslogtreecommitdiff
path: root/src/input_handler.cc
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2024-03-27 19:07:09 +1100
committerMaxime Coste <mawww@kakoune.org>2024-03-27 19:07:09 +1100
commit390bff3435e571e3a2ed81004aae74e0c5851218 (patch)
tree2cedea0f198bd32a2f09813c5be0e570dfdf681b /src/input_handler.cc
parent610d4114a92a31819f45b734dddb4f173b661168 (diff)
Do not make cursor visible when not dragging
Fixes #5130
Diffstat (limited to 'src/input_handler.cc')
-rw-r--r--src/input_handler.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/input_handler.cc b/src/input_handler.cc
index b4bb32a4..585d3498 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};