feat(search): highlight the current match in its own color
Every match of the in-place search used the same mark color, so after pressing n or N the only hint of the current match was the counter in the window title, which is easy to miss on a short query or a dense screen. The marker now colors the current match with the second mark color and keeps the rest on the first one, rebuilding the marker whenever the index changes. Fixes #51
This commit is contained in:
6 files changed
+91
-6
No files matched your search
+3
-1
@@ -35,7 +35,9 @@ to use a regular expression; both modifiers can be combined. Write a doubled
|
||||
backslash (``\\c``, ``\\r``) to search for those prefixes literally. While the search
|
||||
is active, :kbd:`n` jumps to the next match, :kbd:`N` to the previous one and
|
||||
:kbd:`Escape` ends it. The ``[current/total]`` counter is shown in the window
|
||||
title and matches use the first marker color (see :opt:`mark1_foreground`).
|
||||
title, matches use the first mark color (see :opt:`mark1_foreground`) and the
|
||||
current match uses the second one (:opt:`mark2_foreground`), so it stands out
|
||||
from the other matches.
|
||||
The :ac:`scrollback_search_next`, :ac:`scrollback_search_prev` and
|
||||
:ac:`clear_scrollback_search` actions can also be mapped directly.
|
||||
|
||||
|
||||
Reference in new issue
Block a user