mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-04 16:53:27 +03:00
Do not complete redundant switches
This commit is contained in:
parent
64d4d29d43
commit
9e0502a1ca
@ -821,7 +821,10 @@ Completions CommandManager::complete(const Context& context,
|
||||
{
|
||||
auto switches = Kakoune::complete(token.content.substr(1_byte), pos_in_token,
|
||||
concatenated(command.param_desc.switches
|
||||
| transform(&SwitchMap::Item::key),
|
||||
| transform(&SwitchMap::Item::key)
|
||||
| filter([&](const auto& key) {
|
||||
return not parser.get_switch(key);
|
||||
}),
|
||||
ConstArrayView<String>{"-"}));
|
||||
return switches.empty()
|
||||
? Completions{}
|
||||
|
Loading…
Reference in New Issue
Block a user