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()
|
||||
{
|
||||
while (m_ui->is_key_available())
|
||||
{
|
||||
handle_key(m_ui->get_key());
|
||||
m_mode_trash.clear();
|
||||
}
|
||||
m_context.window().forget_timestamp();
|
||||
}
|
||||
|
||||
|
@ -997,7 +1000,6 @@ void Client::handle_key(Key key)
|
|||
if (was_recording and is_recording())
|
||||
m_recorded_keys += key_to_str(key);
|
||||
}
|
||||
m_mode_trash.clear();
|
||||
}
|
||||
|
||||
void Client::start_recording(char reg)
|
||||
|
|
Loading…
Reference in New Issue
Block a user