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.
|
||||
|
||||
|
||||
@@ -279,6 +279,8 @@ Detailed list of changes
|
||||
with :kbd:`n` and :kbd:`N`. Prefix the query with :code:`\c` for a case
|
||||
sensitive search and :code:`\r` for a regular expression; write a doubled
|
||||
backslash (:code:`\\c`, :code:`\\r`) to search for those prefixes literally.
|
||||
The current match is drawn with the second mark color, so the match reached
|
||||
with :kbd:`n` and :kbd:`N` is visible without looking at the window title.
|
||||
See :doc:`basic` for the details.
|
||||
|
||||
- A configurable :opt:`leader` key now opens a which-key panel listing every
|
||||
|
||||
Reference in new issue
Block a user