summaryrefslogtreecommitdiff
path: root/src/commands.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2016-11-28 13:59:55 +0000
committerMaxime Coste <frrrwww@gmail.com>2016-11-28 13:59:55 +0000
commit2f3a7112eafe7bfa6ddd9c6b8a3e6d11a44ce49d (patch)
treec3adad7f5e58664311e26f74b71b7a7ca96a66a0 /src/commands.cc
parent54d540021cd50dc78e58a127e4770dc7b26e161f (diff)
Add more memory domains to certain data
Diffstat (limited to 'src/commands.cc')
-rw-r--r--src/commands.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/commands.cc b/src/commands.cc
index b7f4bd01..32d54996 100644
--- a/src/commands.cc
+++ b/src/commands.cc
@@ -940,7 +940,11 @@ void define_command(const ParametersParser& parser, Context& context, const Shel
String output = ShellManager::instance().eval(shell_cmd, context, {},
ShellManager::Flags::WaitForStdout,
shell_context).first;
- return Completions{ 0_byte, pos_in_token, split(output, '\n', 0) };
+ CandidateList candidates;
+ for (auto& str : split(output, '\n', 0))
+ candidates.push_back(std::move(str));
+
+ return Completions{ 0_byte, pos_in_token, std::move(candidates) };
};
}
else if (auto shell_cmd_opt = parser.get_switch("shell-candidates"))