summaryrefslogtreecommitdiff
path: root/src/client.cc
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2023-08-27 08:05:46 +1000
committerMaxime Coste <mawww@kakoune.org>2023-09-02 12:55:57 +1000
commit20a2bca52e0d159cdbab4ff6d38024cd1503a4f5 (patch)
treea019bb44362357ddf4ca8db4a17c576528825100 /src/client.cc
parent699027000551f04ce9f3e532d20c6e484ca7a945 (diff)
Do not make cursor visible after mouse scrolling and view commands
ensure cursor is visible after user input except if the command implementation opted-out. Hooks and timers should not enforce visible cursor. PageUp/PageDown and `<c-f>` / `<c-b>` commands still move the cursor as this seemed a desired behaviour.
Diffstat (limited to 'src/client.cc')
-rw-r--r--src/client.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/client.cc b/src/client.cc
index 6996ee13..5d6cee62 100644
--- a/src/client.cc
+++ b/src/client.cc
@@ -109,7 +109,10 @@ bool Client::process_pending_inputs()
else if (key == Key::FocusOut)
context().hooks().run_hook(Hook::FocusOut, context().name(), context());
else
+ {
+ context().ensure_cursor_visible = true;
m_input_handler.handle_key(key);
+ }
context().hooks().run_hook(Hook::RawKey, to_string(key), context());
}