summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2016-11-20 11:16:34 +0000
committerMaxime Coste <frrrwww@gmail.com>2016-11-20 11:16:34 +0000
commitcd8d51af3496ef7f82ab773e241de7168ab5c4b7 (patch)
treea514330895528b3b82e7d19d1dff775b49395c07 /src
parent47a82b9855fe440afb3b533c899b9cbe38a898c2 (diff)
Fix PerArgumentCommandCompleter when completing the non first arg
The actualy query passed was always the first argument.
Diffstat (limited to 'src')
-rw-r--r--src/commands.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/commands.cc b/src/commands.cc
index c2721411..1b869b98 100644
--- a/src/commands.cc
+++ b/src/commands.cc
@@ -93,7 +93,8 @@ struct PerArgumentCommandCompleter<Completer, Rest...> : PerArgumentCommandCompl
return m_completer(context, flags, arg, pos_in_token);
}
return PerArgumentCommandCompleter<Rest...>::operator()(
- context, flags, params, token_to_complete-1, pos_in_token);
+ context, flags, params.subrange(1),
+ token_to_complete-1, pos_in_token);
}
Completer m_completer;