mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 11:22:52 +08:00
Fix regression when erasing word in search field
This fixes a crash introduced in the reader port. The tmux tests are not great but at least easy to write.
This commit is contained in:
parent
9ac5e79e46
commit
1b9e5258b5
|
@ -1573,7 +1573,7 @@ impl ReaderData {
|
|||
let mut buff_pos = el.position();
|
||||
while buff_pos != boundary {
|
||||
let idx = if move_right { buff_pos } else { buff_pos - 1 };
|
||||
let c = self.command_line.at(idx);
|
||||
let c = el.at(idx);
|
||||
if !state.consume_char(c) {
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -34,3 +34,11 @@ tmux-sleep
|
|||
isolated-tmux send-keys Enter
|
||||
# CHECK: prompt 2> echo no such command in history
|
||||
isolated-tmux capture-pane -p | grep 'prompt 2'
|
||||
isolated-tmux send-keys C-c
|
||||
|
||||
isolated-tmux send-keys C-r hay/shmay
|
||||
isolated-tmux send-keys C-w C-h
|
||||
isolated-tmux send-keys Enter
|
||||
# CHECK: prompt 2> true hay ee hay
|
||||
isolated-tmux capture-pane -p | grep 'prompt 2>'
|
||||
isolated-tmux send-keys C-c
|
||||
|
|
Loading…
Reference in New Issue
Block a user