Fix unnecessary undo in backward history search after returning to the present

Currently, if we return to the present, fish thinks that it still has a transient edit. This results in an unnecessary undo when performing a backward search. For example:
1. Type ': '.
2. Do a backward token search.
3. Do a forward token search.
4. Do another backward token search - this will result in the undo of ': '.
This commit is contained in:
kerty
2025-02-02 23:49:28 +03:00
committed by Johannes Altmanninger
parent c1c23269d2
commit 5e4f801ad5
2 changed files with 24 additions and 27 deletions

View File

@@ -4,11 +4,12 @@
isolated-tmux-start
isolated-tmux send-keys ': 1' Enter
isolated-tmux send-keys ': ' M-Up M-Down M-Up M-Up M-Up Enter
isolated-tmux send-keys C-l 'echo still alive' Enter
isolated-tmux send-keys ': ' M-Up M-Down M-Up M-Up M-Up M-Down Enter
isolated-tmux send-keys 'echo still alive' Enter
tmux-sleep
# isolated-tmux capture-pane -p | tail -2
isolated-tmux capture-pane -p
# CHECK: prompt 0> : 1
# CHECK: prompt 1> : 1
# CHECK: prompt 2> echo still alive
# CHECK: still alive
# CHECK: prompt 3>