summaryrefslogtreecommitdiff
path: root/src/input_handler.cc
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2017-05-26 08:28:34 +0100
committerMaxime Coste <mawww@kakoune.org>2017-05-26 08:28:34 +0100
commit11f924c5283e5fd725efef497bb07a03cf44c270 (patch)
tree9ff33af3daaa360f06a36da0b54e9bfc1a824a25 /src/input_handler.cc
parent5a93159012d698554b9ef63e1e98885b4bddf112 (diff)
Use a ScopedSetBool instead of manual set/unset for InputModes::Normal::m_in_on_key
Diffstat (limited to 'src/input_handler.cc')
-rw-r--r--src/input_handler.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/input_handler.cc b/src/input_handler.cc
index f57f0029..51c88b57 100644
--- a/src/input_handler.cc
+++ b/src/input_handler.cc
@@ -200,8 +200,7 @@ public:
void on_key(Key key) override
{
- m_in_on_key.set();
- auto unset_in_on_key = on_scope_end([this]{ m_in_on_key.unset(); });
+ ScopedSetBool set_in_on_key{m_in_on_key};
bool do_restore_hooks = false;
auto restore_hooks = on_scope_end([&, this]{