mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-08 02:31:18 -03:00
reader: make Escape during history search restore commandline again
Commit 3b30d92b6 (Commit transient edit when closing pager, 2022-08-31)
inadvertently introduced two regressions to history search:
1. It made Escape keeps the selected history entry,
instead of restoring the commandline before history search.
2. It made history search commands add undo entries.
Fix both of this issues.
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
# disable on github actions because it's flakey
|
||||
#REQUIRES: test -z "$CI"
|
||||
|
||||
set -g isolated_tmux_fish_extra_args -C '
|
||||
set -g fish_autosuggestion_enabled 0
|
||||
'
|
||||
isolated-tmux-start
|
||||
|
||||
isolated-tmux send-keys 'true needle' Enter
|
||||
@@ -15,3 +18,12 @@ isolated-tmux send-keys C-p C-a M-f M-f M-f M-.
|
||||
# CHECK: prompt 2> true hay needle hay
|
||||
tmux-sleep
|
||||
isolated-tmux capture-pane -p
|
||||
|
||||
isolated-tmux send-keys C-e C-u true Up Up Escape
|
||||
tmux-sleep
|
||||
isolated-tmux capture-pane -p | grep 'prompt 2'
|
||||
# CHECK: prompt 2> true
|
||||
isolated-tmux send-keys C-z _
|
||||
tmux-sleep
|
||||
isolated-tmux capture-pane -p | grep 'prompt 2'
|
||||
# CHECK: prompt 2> _
|
||||
|
||||
Reference in New Issue
Block a user