diff --git a/src/ui/inputwin.c b/src/ui/inputwin.c index 6e98af02..fd8a8835 100644 --- a/src/ui/inputwin.c +++ b/src/ui/inputwin.c @@ -325,6 +325,10 @@ inp_get_line(void) while (!line) { line = inp_readline(); ui_update(); + // Let GLib sources (notably the editor child watch) dispatch so + // ui_resume can run if the prompt was raised mid-editor-session. + while (g_main_context_iteration(NULL, FALSE)) + ; } status_bar_clear_prompt(); return line; @@ -356,6 +360,10 @@ inp_get_password(void) while (!password) { password = inp_readline(); ui_update(); + // Let GLib sources (notably the editor child watch) dispatch so + // ui_resume can run if the prompt was raised mid-editor-session. + while (g_main_context_iteration(NULL, FALSE)) + ; } get_password = FALSE; status_bar_clear_prompt();