diff options
| author | Maxime Coste <mawww@kakoune.org> | 2016-12-15 09:46:10 +0000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2016-12-15 09:46:10 +0000 |
| commit | 71cc9f101122d9864e7078c72704b89ae8b4f00b (patch) | |
| tree | 9b655f90ebdecea103982bce905a4cc2dac4de38 /src/input_handler.cc | |
| parent | 9ad1c19f69646138888054237e61c8934dd7d4dd (diff) | |
Fix reentrancy in InputeModes::Normal::on_key
Diffstat (limited to 'src/input_handler.cc')
| -rw-r--r-- | src/input_handler.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/input_handler.cc b/src/input_handler.cc index e9c6542d..2a6a8b68 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -196,8 +196,8 @@ public: void on_key(Key key) override { - m_in_on_key = true; - auto unset_in_on_key = on_scope_end([this]{ m_in_on_key = false; }); + m_in_on_key.set(); + auto unset_in_on_key = on_scope_end([this]{ m_in_on_key.unset(); }); bool do_restore_hooks = false; auto restore_hooks = on_scope_end([&, this]{ @@ -301,7 +301,7 @@ private: NormalParams m_params = { 0, 0 }; bool m_hooks_disabled = false; bool m_enabled = false; - bool m_in_on_key = false; + NestedBool m_in_on_key; Timer m_idle_timer; Timer m_fs_check_timer; MouseHandler m_mouse_handler; |
