diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2013-09-16 19:25:18 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2013-09-16 19:25:18 +0100 |
| commit | 168b4b775b6271c4a3ae2b0047e8d81fbda4e618 (patch) | |
| tree | fa6efc91bee0c4984b6ad136ad6ebec288a3f8a3 /src/client.cc | |
| parent | 06e06d6ea67f10ececd7232471505e7d8f36d509 (diff) | |
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.
Diffstat (limited to 'src/client.cc')
| -rw-r--r-- | src/client.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client.cc b/src/client.cc index 08ae32c7..22f334a6 100644 --- a/src/client.cc +++ b/src/client.cc @@ -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) |
