ui: Only call ui_flush when the busy state changes

Also add back the `ui_flush` call to `get_keystroke`. Its necessary to display
prompt messages correctly.
This commit is contained in:
Thiago de Arruda
2015-03-16 08:35:43 -03:00
parent 5199456471
commit 1d80c0e3a0
2 changed files with 3 additions and 3 deletions

View File

@@ -2364,7 +2364,7 @@ int get_keystroke(void)
mapped_ctrl_c = FALSE; /* mappings are not used here */
for (;; ) {
ui_flush();
/* Leave some room for check_termcode() to insert a key code into (max
* 5 chars plus NUL). And fix_input_buffer() can triple the number of
* bytes. */

View File

@@ -155,16 +155,16 @@ void ui_busy_start(void)
{
if (!(busy++)) {
UI_CALL(busy_start);
}
ui_flush();
}
}
void ui_busy_stop(void)
{
if (!(--busy)) {
UI_CALL(busy_stop);
}
ui_flush();
}
}