mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-05 16:21:15 -03: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:
@@ -1573,7 +1573,7 @@ fn move_word(
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user