mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-31 03:51:14 -03:00
Fix case-correcting completion stomping token on common prefix
The prefix has already been case-corrected at this point and the remaining
completions are for the suffix only.
Fixes #7211
Introduced in
28d67c8f Show completion list on Tab also if a common prefix was inserted
This commit is contained in:
@@ -1812,6 +1812,7 @@ bool reader_data_t::handle_completions(const completion_list_t &comp, size_t tok
|
||||
|
||||
if (use_prefix) {
|
||||
for (completion_t &c : surviving_completions) {
|
||||
c.flags &= ~COMPLETE_REPLACES_TOKEN;
|
||||
wcstring &comp = c.completion;
|
||||
comp.erase(comp.begin(), comp.begin() + common_prefix.size());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user