Make shift+backspace erase entire search input #40
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Rather than backspacing a bunch of times. Also it works from any position in the input.
This patch is arguable since the search terms should be short and hitting 4 or 5 backspaces isn't horrible. Also on some systems (windows) ctrl+backspace erases the previous word.
This needs documentation, but I am not sure where it should go in the README. Documenting the use of the return key to:
accept the currently highlighted entry or
close command-pal if there is no match
The use of up/down arrows to navigate through the list.
Also if the "close command-pal on (multiple) backspaces" patch is added, documenting that would be good as well.
NOTE: if this code is merged after the multiple backspaces code, the then clause for this code should reset the backup counter and clear the feedback box like the other cases. Also it needs to go before the backspace exit code in the if/then chain otherwise it will never be reached if exit with backspace is enabled.