Also execute prompt callback when just starting

incsearch will immediatly display the result of using an empty
string (reusing the search register content).

Fixes #1174
This commit is contained in:
Maxime Coste 2017-02-01 23:04:37 +00:00
parent bc0dfa9e8f
commit d90919568a

View File

@ -923,7 +923,12 @@ private:
context().print_status(display_line); context().print_status(display_line);
} }
void on_enabled() override { display(); } void on_enabled() override
{
display();
m_callback(m_line_editor.line(), PromptEvent::Change, context());
}
void on_disabled() override { context().print_status({}); } void on_disabled() override { context().print_status({}); }
PromptCallback m_callback; PromptCallback m_callback;