diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2022-04-21 16:54:27 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2022-04-21 16:54:27 +0000 |
| commit | 9907d7bbe956840d75630702b6f48ee5be60f61f (patch) | |
| tree | b17b4ba0dab29957ca402b467a71176b60e1b916 /spawn.h | |
| parent | url-mode: allow locked modifiers while handling label letter input (diff) | |
search: don't modify search.start coord *before* finding next match
The match logic uses the last start coordinate to determine which end
points in the selection to update. This sometimes fails when the start
coordinate has been changed by e.g. a key binding - the new start
coordinate is incorrectly matched against the old-but-modified start
coordinate, causing foot to e.g. *not* upate the selection start
coordinate.
Example:
$ echo 'test\n\test\ntest'
Then do a scrollback search for 'test. The first match is found
correctly (the last 'test'), but searching for the previous match
(ctrl+r) does not select the middle 'test'.
Fix by passing the search direction to search_find_next(), and have
_it_ calculate the coordinate to start search. There are three possibilities:
* forward
* backward
* "backward", but at the same position
The first two are used when searching for next/prev match with ctrl+s
and ctrl+r. The last one is used when the search criteria is
updated. In this case, we don't want to move to the previous match,
*unless* the current match no longer matches.
Diffstat (limited to 'spawn.h')
0 files changed, 0 insertions, 0 deletions
