From dae8f653089105afeab1719b1152139a47bc7136 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 10 Oct 2012 19:15:09 +0200 Subject: [PATCH] exec concat all its arguments instead of accepting only one --- src/commands.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/commands.cc b/src/commands.cc index 5d9ab6e1..31066967 100644 --- a/src/commands.cc +++ b/src/commands.cc @@ -691,10 +691,15 @@ void exec_keys(const KeyList& keys, Context& context) void exec_string(const CommandParameters& params, Context& context) { - if (params.size() != 1) + if (params.empty()) throw wrong_argument_count(); - KeyList keys = parse_keys(params[0]); + KeyList keys; + for (auto& param : params) + { + KeyList param_keys = parse_keys(param); + keys.insert(keys.end(), param_keys.begin(), param_keys.end()); + } exec_keys(keys, context); }