diff options
Diffstat (limited to 'src/command_manager.cc')
| -rw-r--r-- | src/command_manager.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/command_manager.cc b/src/command_manager.cc index 26b2379f..6e61d55d 100644 --- a/src/command_manager.cc +++ b/src/command_manager.cc @@ -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: |
