mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-23 21:31:14 -03:00
Fix cursor position after accepting Vi mode autosuggestion
Closes #12430
This commit is contained in:
@@ -4,6 +4,7 @@ fish ?.?.? (released ???)
|
||||
Regression fixes:
|
||||
-----------------
|
||||
- (from 4.4.0) Vi mode ``d,f`` key binding (:issue:`12417`).
|
||||
- (from 4.4.0) Vi mode crash on ``c,i,w`` after accepting autosuggestion (:issue:`12430`).
|
||||
- (from 4.4.0) ``fish_vi_key_bindings`` called with mode argument (:issue:`12413`).
|
||||
|
||||
fish 4.4.0 (released February 03, 2026)
|
||||
|
||||
@@ -5683,6 +5683,7 @@ fn accept_autosuggestion(&mut self, amount: AutosuggestionPortion) {
|
||||
};
|
||||
self.data
|
||||
.replace_substring(EditableLineTag::Commandline, range, replacement);
|
||||
self.update_buff_pos(self.active_edit_line_tag(), None);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,3 +20,11 @@ send(2 * "dge")
|
||||
sendline("")
|
||||
expect_re(r"\bvi\b")
|
||||
expect_prompt()
|
||||
|
||||
sendline("echo suggest-this")
|
||||
send("ech")
|
||||
send("\033")
|
||||
sleep(1)
|
||||
send("li123")
|
||||
sendline("")
|
||||
expect_re(r"\bsuggest-thi123s\b")
|
||||
|
||||
Reference in New Issue
Block a user