mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-26 04:52:53 +03:00
Wrap command completion containing spaces, semicolons or quotes in double quotes
This commit is contained in:
parent
7f0e82dd81
commit
36620f8cc8
@ -545,6 +545,13 @@ Completions CommandManager::complete(const Context& context,
|
|||||||
cursor_pos_in_token);
|
cursor_pos_in_token);
|
||||||
completions.start += start;
|
completions.start += start;
|
||||||
completions.end += start;
|
completions.end += start;
|
||||||
|
|
||||||
|
for (auto& candidate : completions.candidates)
|
||||||
|
{
|
||||||
|
if (candidate.find_first_of(" \t;\"'") != String::npos)
|
||||||
|
candidate = '"' + escape(candidate, '"', '\\') + '"';
|
||||||
|
}
|
||||||
|
|
||||||
return completions;
|
return completions;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user