mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-25 12:36:11 +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);
|
||||
completions.start += start;
|
||||
completions.end += start;
|
||||
|
||||
for (auto& candidate : completions.candidates)
|
||||
{
|
||||
if (candidate.find_first_of(" \t;\"'") != String::npos)
|
||||
candidate = '"' + escape(candidate, '"', '\\') + '"';
|
||||
}
|
||||
|
||||
return completions;
|
||||
}
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user