mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-15 23:22:53 +08:00
Show autosuggestion again after undoing deletion
Commit e5b34d5cd (Suppress autosuggesting during backspacing like browsers do, 2012-02-06) disabled autosuggestion when backspacing. Autosuggestions are re-enabled whenever we insert anything in the command line. Undo uses a different code path to insert into the command line, which does not re-enable autosuggestion. Fix that. Also re-enable autosuggestion when undo erases from the command line. This seems like the simplest approach. It's not clear if there's a better behavior; browsers don't agree on one in any case.
This commit is contained in:
parent
dc75367343
commit
0c5a616113
@ -2932,6 +2932,7 @@ impl ReaderData {
|
||||
self.flash();
|
||||
return;
|
||||
}
|
||||
self.suppress_autosuggestion = false;
|
||||
if elt == EditableLineTag::Commandline {
|
||||
self.clear_pager();
|
||||
}
|
||||
|
@ -77,3 +77,10 @@ isolated-tmux send-keys C-u echo Space old-arg Enter C-l foo2 Space Tab Tab M-.
|
||||
tmux-sleep
|
||||
isolated-tmux capture-pane -p
|
||||
# CHECK: prompt 5> foo2 aabc old-arg
|
||||
|
||||
isolated-tmux send-keys C-u 'echo suggest this' Enter C-l
|
||||
tmux-sleep
|
||||
isolated-tmux send-keys 'echo sug' C-w C-z
|
||||
tmux-sleep
|
||||
isolated-tmux capture-pane -p
|
||||
# CHECK: prompt 6> echo suggest this
|
||||
|
Loading…
x
Reference in New Issue
Block a user