diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2012-10-18 19:56:57 +0200 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2012-10-18 19:56:57 +0200 |
| commit | abf514f30539dc6f7d29793d0b4be860149311b8 (patch) | |
| tree | 3824ffe7f32717ceee5cbb01713b84e008fed427 /src/input_handler.cc | |
| parent | 132c31042ec7a5b4afc7a856791f9498eea99ca3 (diff) | |
avoid utf8 errors with invalid keys, like ncurse KEY_RESIZE
Diffstat (limited to 'src/input_handler.cc')
| -rw-r--r-- | src/input_handler.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/input_handler.cc b/src/input_handler.cc index d91f30d9..33f8d947 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -627,7 +627,9 @@ void InputHandler::on_next_key(KeyCallback callback) void InputHandler::handle_next_input(Context& context) { - m_mode->on_key(context.ui().get_key(), context); + Key key = context.ui().get_key(); + if (key != Key::Invalid) + m_mode->on_key(key, context); context.draw_ifn(); } |
