1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-19 09:21:30 +03:00

Fix reentrancy in InputeModes::Normal::on_key

This commit is contained in:
Maxime Coste 2016-12-15 09:46:10 +00:00
parent 9ad1c19f69
commit 71cc9f1011

View File

@ -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;