fix(f_wait): flush UI before blocking (#25962)

This commit is contained in:
zeertzjq
2023-11-10 15:24:36 +08:00
committed by GitHub
parent bf5cf8ae82
commit d5a85d737a
7 changed files with 82 additions and 26 deletions

View File

@@ -1723,7 +1723,7 @@ static void getchar_common(typval_T *argvars, typval_T *rettv)
// getchar(): blocking wait.
// TODO(bfredl): deduplicate shared logic with state_enter ?
if (!char_avail()) {
// flush output before waiting
// Flush screen updates before blocking.
ui_flush();
(void)os_inchar(NULL, 0, -1, typebuf.tb_change_cnt, main_loop.events);
if (!multiqueue_empty(main_loop.events)) {