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:
parent
9ad1c19f69
commit
71cc9f1011
@ -196,8 +196,8 @@ public:
|
|||||||
|
|
||||||
void on_key(Key key) override
|
void on_key(Key key) override
|
||||||
{
|
{
|
||||||
m_in_on_key = true;
|
m_in_on_key.set();
|
||||||
auto unset_in_on_key = on_scope_end([this]{ m_in_on_key = false; });
|
auto unset_in_on_key = on_scope_end([this]{ m_in_on_key.unset(); });
|
||||||
|
|
||||||
bool do_restore_hooks = false;
|
bool do_restore_hooks = false;
|
||||||
auto restore_hooks = on_scope_end([&, this]{
|
auto restore_hooks = on_scope_end([&, this]{
|
||||||
@ -301,7 +301,7 @@ private:
|
|||||||
NormalParams m_params = { 0, 0 };
|
NormalParams m_params = { 0, 0 };
|
||||||
bool m_hooks_disabled = false;
|
bool m_hooks_disabled = false;
|
||||||
bool m_enabled = false;
|
bool m_enabled = false;
|
||||||
bool m_in_on_key = false;
|
NestedBool m_in_on_key;
|
||||||
Timer m_idle_timer;
|
Timer m_idle_timer;
|
||||||
Timer m_fs_check_timer;
|
Timer m_fs_check_timer;
|
||||||
MouseHandler m_mouse_handler;
|
MouseHandler m_mouse_handler;
|
||||||
|
Loading…
Reference in New Issue
Block a user