diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2014-04-26 15:09:07 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2014-04-27 12:37:41 +0100 |
| commit | b370f91025a6847fe3204e34f5e9016b34ef4f0f (patch) | |
| tree | 2b5be86a0727082149768dea05f3c0f5cafc9480 /src/normal.cc | |
| parent | 0c1b27cfa7d85f08677e7784580c2869ad6602cd (diff) | |
Add -init switch to :prompt to set the initial text
Fixes #97
Diffstat (limited to 'src/normal.cc')
| -rw-r--r-- | src/normal.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/normal.cc b/src/normal.cc index 8b691190..1e2edd82 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -426,7 +426,7 @@ void for_each_char(Context& context, int) void command(Context& context, int) { context.input_handler().prompt( - ":", get_color("Prompt"), + ":", "", get_color("Prompt"), std::bind(&CommandManager::complete, &CommandManager::instance(), _1, _2, _3, _4), [](const String& cmdline, PromptEvent event, Context& context) { if (context.has_ui()) @@ -451,7 +451,7 @@ template<InsertMode mode> void pipe(Context& context, int) { const char* prompt = mode == InsertMode::Replace ? "pipe:" : "pipe (ins):"; - context.input_handler().prompt(prompt, get_color("Prompt"), shell_complete, + context.input_handler().prompt(prompt, "", get_color("Prompt"), shell_complete, [](const String& cmdline, PromptEvent event, Context& context) { if (event != PromptEvent::Validate) @@ -589,7 +589,7 @@ template<typename T> void regex_prompt(Context& context, const String prompt, T func) { DynamicSelectionList selections{context.buffer(), context.selections()}; - context.input_handler().prompt(prompt, get_color("Prompt"), complete_nothing, + context.input_handler().prompt(prompt, "", get_color("Prompt"), complete_nothing, [=](const String& str, PromptEvent event, Context& context) { try { |
