diff options
| author | Maxime Coste <mawww@kakoune.org> | 2023-08-27 08:05:46 +1000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2023-09-02 12:55:57 +1000 |
| commit | 20a2bca52e0d159cdbab4ff6d38024cd1503a4f5 (patch) | |
| tree | a019bb44362357ddf4ca8db4a17c576528825100 /src/input_handler.hh | |
| parent | 699027000551f04ce9f3e532d20c6e484ca7a945 (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/input_handler.hh')
| -rw-r--r-- | src/input_handler.hh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/input_handler.hh b/src/input_handler.hh index 00d2d53a..afcc24d4 100644 --- a/src/input_handler.hh +++ b/src/input_handler.hh @@ -204,7 +204,13 @@ void on_next_key_with_autoinfo(const Context& context, StringView mode_name, }); } -void scroll_window(Context& context, LineCount offset, bool mouse_dragging = false); +enum class OnHiddenCursor { + PreserveSelections, + MoveCursor, + MoveCursorAndAnchor, +}; + +void scroll_window(Context& context, LineCount offset, OnHiddenCursor on_hidden_cursor); } |
