diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2023-09-26 15:54:03 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2023-10-08 08:38:37 +0000 |
| commit | 78665a7e809afd470e1236867761d51de9737eaa (patch) | |
| tree | 70d44c67117079b1e0bb373911ee5fc570b9a3ae /key-binding.h | |
| parent | render: disable transparency in margins when in fullscreen (diff) | |
search: add more key bindings to extend the current match
This patch adds the following new search key bindings:
* extend-char (shift+right)
* extend-line-down (shift+down)
* extend-backward-char (shift+left)
* extend-backward-to-word-boundary (ctrl+shift+left)
* extend-backward-to-next-whitespace (ctrl+shift+alt+left)
* extend-line-up (shift+up)
They can be used to extend the search match (i.e. the selection).
This patch also adds an initial set of key bindings to scroll in the
scrollback history:
* scrollback-up-page
* scrollback-down-page
These work just like the key bindings for the normal mode. Also note
that it was already possible to scroll using the mouse.
This patch also fixes a couple of search mode bugs:
* crashing when a search match ends in the last column
* grapheme clusters not being matched correctly
* Search match not being "extendable" after a pointer leave event
* A few others, related to either large matches, or extending matches
after moving the viewport.
There are still a couple of (known) issues:
* A search match isn't correctly highlighted if its *starting* point
is outside the viewport.
* Extending the match to end of the scrollback (i.e. the most recent
output) is simply buggy.
Related to #419
Diffstat (limited to 'key-binding.h')
| -rw-r--r-- | key-binding.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/key-binding.h b/key-binding.h index ea2f3d6d..b85fc072 100644 --- a/key-binding.h +++ b/key-binding.h @@ -58,6 +58,9 @@ enum bind_action_normal { enum bind_action_search { BIND_ACTION_SEARCH_NONE, + BIND_ACTION_SEARCH_SCROLLBACK_UP_PAGE, + BIND_ACTION_SEARCH_SCROLLBACK_DOWN_PAGE, + // TODO: copy the remaining scrollback key-bindings from normal mode BIND_ACTION_SEARCH_CANCEL, BIND_ACTION_SEARCH_COMMIT, BIND_ACTION_SEARCH_FIND_PREV, @@ -72,8 +75,14 @@ enum bind_action_search { BIND_ACTION_SEARCH_DELETE_PREV_WORD, BIND_ACTION_SEARCH_DELETE_NEXT, BIND_ACTION_SEARCH_DELETE_NEXT_WORD, + BIND_ACTION_SEARCH_EXTEND_CHAR, BIND_ACTION_SEARCH_EXTEND_WORD, BIND_ACTION_SEARCH_EXTEND_WORD_WS, + BIND_ACTION_SEARCH_EXTEND_LINE_DOWN, + BIND_ACTION_SEARCH_EXTEND_BACKWARD_CHAR, + BIND_ACTION_SEARCH_EXTEND_BACKWARD_WORD, + BIND_ACTION_SEARCH_EXTEND_BACKWARD_WORD_WS, + BIND_ACTION_SEARCH_EXTEND_LINE_UP, BIND_ACTION_SEARCH_CLIPBOARD_PASTE, BIND_ACTION_SEARCH_PRIMARY_PASTE, BIND_ACTION_SEARCH_UNICODE_INPUT, |
