From d90919568a289e6a3e131d8ea6be67e27ebe4d6c Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 1 Feb 2017 23:04:37 +0000 Subject: [PATCH] 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 --- src/input_handler.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/input_handler.cc b/src/input_handler.cc index 9a39ef9e..b112f7ad 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -923,7 +923,12 @@ private: 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({}); } PromptCallback m_callback;