summaryrefslogtreecommitdiff
path: root/src/input_handler.hh
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2012-12-05 19:22:40 +0100
committerMaxime Coste <frrrwww@gmail.com>2012-12-06 13:33:26 +0100
commitb81ea0bc9237f4a365521ff18859c369bed98dce (patch)
tree671003c6513517173047aaf8cbe97a788d2c5941 /src/input_handler.hh
parent3438ba7ec3e500f9eb442d9d07f7276a6da7aed5 (diff)
PromptHandler now call callback when edited and aborted.
Used for a new feature: incremental search
Diffstat (limited to 'src/input_handler.hh')
-rw-r--r--src/input_handler.hh9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/input_handler.hh b/src/input_handler.hh
index e5509c22..3d520d27 100644
--- a/src/input_handler.hh
+++ b/src/input_handler.hh
@@ -13,7 +13,14 @@ class Editor;
class Context;
using MenuCallback = std::function<void (int, Context&)>;
-using PromptCallback = std::function<void (const String&, Context&)>;
+
+enum class PromptEvent
+{
+ Change,
+ Abort,
+ Validate
+};
+using PromptCallback = std::function<void (const String&, PromptEvent, Context&)>;
using KeyCallback = std::function<void (const Key&, Context&)>;
class InputMode;