mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-27 20:31:17 -03:00
Fix case-changing autosuggestions generated mid-token
This fixes a bug where a case-changing autosuggestion generated from the middle of a token would append too much to the end of the token. Fixes #8820
This commit is contained in:
@@ -1615,8 +1615,7 @@ wcstring completion_apply_to_command_line(const wcstring &val, complete_flags_t
|
||||
const wchar_t *begin, *end;
|
||||
|
||||
const wchar_t *buff = command_line.c_str();
|
||||
parse_util_token_extent(buff, cursor_pos, &begin, nullptr, nullptr, nullptr);
|
||||
end = buff + cursor_pos;
|
||||
parse_util_token_extent(buff, cursor_pos, &begin, &end, nullptr, nullptr);
|
||||
|
||||
wcstring sb(buff, begin - buff);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user