fix(search): allow searching for a literal \c or \r
A query that starts with one of the two modifier prefixes could not be escaped, so the text itself was unreachable: \c and \r were always consumed as modifiers and the query ended up empty. A doubled backslash now ends the modifier section and stands for the literal backslash, and the help line and the docs document it. Fixes #48
This commit is contained in:
5 files changed
+37
-6
No files matched your search
+2
-1
@@ -31,7 +31,8 @@ Search scrollback in place :sc:`search_scrollback_prompt`
|
||||
|
||||
The in-place search highlights every match without replacing the screen with a
|
||||
pager. Prefix the query with ``\c`` to match case sensitively and with ``\r``
|
||||
to use a regular expression; both modifiers can be combined. While the search
|
||||
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`).
|
||||
|
||||
+3
-2
@@ -277,8 +277,9 @@ Detailed list of changes
|
||||
highlights every match without opening the pager, shows the
|
||||
:code:`[current/total]` counter in the window title and moves between matches
|
||||
with :kbd:`n` and :kbd:`N`. Prefix the query with :code:`\c` for a case
|
||||
sensitive search and :code:`\r` for a regular expression. See
|
||||
:doc:`basic` for the details.
|
||||
sensitive search and :code:`\r` for a regular expression; write a doubled
|
||||
backslash (:code:`\\c`, :code:`\\r`) to search for those prefixes literally.
|
||||
See :doc:`basic` for the details.
|
||||
|
||||
- A configurable :opt:`leader` key now opens a which-key panel listing every
|
||||
multi-key mapping available under that prefix, without waiting for a timeout.
|
||||
|
||||
Reference in new issue
Block a user