summaryrefslogtreecommitdiff
path: root/src/command_manager.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2016-09-18 16:07:00 +0100
committerMaxime Coste <frrrwww@gmail.com>2016-09-18 16:07:00 +0100
commitd14c39ebddecb2e154bfe0e87fcb34419380c5e5 (patch)
tree6353594b82dde6e1a66a52a115cb15ae158faac0 /src/command_manager.cc
parent8627c93e11ad8649502b859697af7ed4b194393c (diff)
Rewrite PerArgumentCommandCompleter to use compile time dispatching
No need to store these vectors of std::functions around anymore.
Diffstat (limited to 'src/command_manager.cc')
-rw-r--r--src/command_manager.cc19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/command_manager.cc b/src/command_manager.cc
index ef2fef5c..250a5fe4 100644
--- a/src/command_manager.cc
+++ b/src/command_manager.cc
@@ -672,23 +672,4 @@ Completions CommandManager::complete(const Context& context,
return Completions{};
}
-Completions PerArgumentCommandCompleter::operator()(const Context& context,
- CompletionFlags flags,
- CommandParameters params,
- size_t token_to_complete,
- ByteCount pos_in_token)
- const
-{
- if (token_to_complete >= m_completers.size())
- return Completions{};
-
- // it is possible to try to complete a new argument
- kak_assert(token_to_complete <= params.size());
-
- const String& argument = token_to_complete < params.size() ?
- params[token_to_complete] : String();
- return m_completers[token_to_complete](context, flags, argument,
- pos_in_token);
-}
-
}