mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-22 11:01:48 +03:00
Do not clear Client::m_mode_trash in handle_key, but in handle_available_input
handle_key can be called from exec_keys while running a hook, and a previous key in exec_keys could have changed the mode. This would make the mode that runned the hook deleted when the controls returns to it. handle_available_input should always be called at top level, so can safely clear the mode trash.
This commit is contained in:
parent
06e06d6ea6
commit
168b4b775b
@ -981,7 +981,10 @@ bool is_valid(Key key)
|
|||||||
void Client::handle_available_input()
|
void Client::handle_available_input()
|
||||||
{
|
{
|
||||||
while (m_ui->is_key_available())
|
while (m_ui->is_key_available())
|
||||||
|
{
|
||||||
handle_key(m_ui->get_key());
|
handle_key(m_ui->get_key());
|
||||||
|
m_mode_trash.clear();
|
||||||
|
}
|
||||||
m_context.window().forget_timestamp();
|
m_context.window().forget_timestamp();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -997,7 +1000,6 @@ void Client::handle_key(Key key)
|
|||||||
if (was_recording and is_recording())
|
if (was_recording and is_recording())
|
||||||
m_recorded_keys += key_to_str(key);
|
m_recorded_keys += key_to_str(key);
|
||||||
}
|
}
|
||||||
m_mode_trash.clear();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Client::start_recording(char reg)
|
void Client::start_recording(char reg)
|
||||||
|
Loading…
Reference in New Issue
Block a user