mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-31 20:31:19 -03:00
Fix regression causing crash on empty paste in Vi-mode
Fixes d51f669647 (Vi mode: avoid placing cursor beyond last character,
2024-02-14).
Closes #11256
This commit is contained in:
@@ -2936,7 +2936,7 @@ fn handle_readline_command(&mut self, c: ReadlineCmd) {
|
||||
self.data
|
||||
.insert_string(self.active_edit_line_tag(), &yank_str);
|
||||
self.rls_mut().yank_len = yank_str.len();
|
||||
if self.cursor_end_mode == CursorEndMode::Inclusive {
|
||||
if !yank_str.is_empty() && self.cursor_end_mode == CursorEndMode::Inclusive {
|
||||
let (_elt, el) = self.active_edit_line();
|
||||
self.update_buff_pos(self.active_edit_line_tag(), Some(el.position() - 1));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user