summaryrefslogtreecommitdiff
path: root/src/normal.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2015-06-26 13:52:01 +0100
committerMaxime Coste <frrrwww@gmail.com>2015-06-26 13:57:23 +0100
commit5b554ff4749bade238b09f919681aa1d1e050515 (patch)
tree25c721d534f23c698394f2f5aa67fb1f7f4dee6c /src/normal.cc
parentb579f90baedaf6ff5030e5ff9e6eaf6ea2017f1c (diff)
Add support for command completion on commands, use it for :new
That means commands can be completed using other commands and their completers. Yes that does makes sense. Closes #296
Diffstat (limited to 'src/normal.cc')
-rw-r--r--src/normal.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/normal.cc b/src/normal.cc
index 4cd8dddf..5257908e 100644
--- a/src/normal.cc
+++ b/src/normal.cc
@@ -345,7 +345,10 @@ void command(Context& context, NormalParams)
context.input_handler().prompt(
":", "", get_face("Prompt"),
- std::bind(&CommandManager::complete, &CommandManager::instance(), _1, _2, _3, _4),
+ [](const Context& context, CompletionFlags flags,
+ StringView cmd_line, ByteCount pos) {
+ return CommandManager::instance().complete(context, flags, cmd_line, pos);
+ },
[](StringView cmdline, PromptEvent event, Context& context) {
if (context.has_ui())
{