Fix PerArgumentCommandCompleter when completing the non first arg

The actualy query passed was always the first argument.
This commit is contained in:
Maxime Coste 2016-11-20 11:16:34 +00:00
parent 47a82b9855
commit cd8d51af34

View File

@ -93,7 +93,8 @@ struct PerArgumentCommandCompleter<Completer, Rest...> : PerArgumentCommandCompl
return m_completer(context, flags, arg, pos_in_token); return m_completer(context, flags, arg, pos_in_token);
} }
return PerArgumentCommandCompleter<Rest...>::operator()( 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; Completer m_completer;