Allow iterating matches in search #5
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
At minimum C-n and C-p should go to the next or the previous match, otherwise the search feature is difficult to use.
This needs further analysis.
The editor might be given a callback to attempt handling the key. The search function would go through a "search" binding map, find actions "down" or "up" and use this to invoke
search()
with a direction flag.This can later be used to toggle flags, specifically case sensitivity or globbing (which should arguably be on by default).
It could also be used as the input mode for the selection add/remove feature of #2. The only caveat there is that the current search mode automatically does an
${input}*
glob that cannot be disabled.In general it would be nice to have some sense of the amount of files that match: one option is to highlight the matches (how?), another one is to append a low-contrast "(no matches)" or "(match 1 of 4)" remark to user's input, or to the right side of the bottom line (like an RPROMPT).