summaryrefslogtreecommitdiff
path: root/src/input_handler.hh
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2016-03-22 22:54:29 +0000
committerMaxime Coste <frrrwww@gmail.com>2016-03-22 22:54:29 +0000
commit5bf92430064a5136dba51402bd852398cee7e994 (patch)
treea146fff9cb74b25a7e00a90eaa2c4afe3d451001 /src/input_handler.hh
parentc1c17db5e9a3bc62f2023bbf355b9031837ee7f4 (diff)
User mappings and :exec are always executed in normal mode
Fix #551
Diffstat (limited to 'src/input_handler.hh')
-rw-r--r--src/input_handler.hh11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/input_handler.hh b/src/input_handler.hh
index 8719ca15..41397b28 100644
--- a/src/input_handler.hh
+++ b/src/input_handler.hh
@@ -82,6 +82,17 @@ public:
DisplayLine mode_line() const;
+ // Force an input handler into normal mode temporarily
+ struct ScopedForceNormal
+ {
+ ScopedForceNormal(InputHandler& handler);
+ ~ScopedForceNormal();
+
+ private:
+ InputHandler& m_handler;
+ InputMode* m_mode;
+ };
+
private:
Context m_context;