summaryrefslogtreecommitdiff
path: root/src/input_handler.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2012-10-28 09:26:54 +0100
committerMaxime Coste <frrrwww@gmail.com>2012-10-28 09:26:54 +0100
commitd9729cc29eb717aae2c68ced24d4b04d4c2ea4cf (patch)
treedfa12788197425cd8c02d1b5a7c10078b2ac4cff /src/input_handler.cc
parent13a081ed4ab770c80e6a258b6aa507ca55df3529 (diff)
Handle all available input before redrawing
Diffstat (limited to 'src/input_handler.cc')
-rw-r--r--src/input_handler.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/input_handler.cc b/src/input_handler.cc
index 33f8d947..56879e98 100644
--- a/src/input_handler.cc
+++ b/src/input_handler.cc
@@ -625,11 +625,14 @@ void InputHandler::on_next_key(KeyCallback callback)
m_mode.reset(new InputModes::NextKey(*this, callback));
}
-void InputHandler::handle_next_input(Context& context)
+void InputHandler::handle_available_inputs(Context& context)
{
- Key key = context.ui().get_key();
- if (key != Key::Invalid)
- m_mode->on_key(key, context);
+ while (context.ui().is_key_available())
+ {
+ Key key = context.ui().get_key();
+ if (key != Key::Invalid)
+ m_mode->on_key(key, context);
+ }
context.draw_ifn();
}