diff --git a/builtin/clean.c b/builtin/clean.c index d7acb94a95..51e483c787 100644 --- a/builtin/clean.c +++ b/builtin/clean.c @@ -594,6 +594,7 @@ static int *list_and_choose(struct menu_opts *opts, struct menu_stuff *stuff) clean_get_color(CLEAN_COLOR_RESET)); } + fflush(stdout); if (strbuf_getline(&choice, stdin, '\n') != EOF) { strbuf_trim(&choice); } else { @@ -676,6 +677,7 @@ static int filter_by_patterns_cmd(void) clean_print_color(CLEAN_COLOR_PROMPT); printf(_("Input ignore patterns>> ")); clean_print_color(CLEAN_COLOR_RESET); + fflush(stdout); if (strbuf_getline(&confirm, stdin, '\n') != EOF) strbuf_trim(&confirm); else @@ -774,6 +776,7 @@ static int ask_each_cmd(void) qname = quote_path_relative(item->string, NULL, &buf); /* TRANSLATORS: Make sure to keep [y/N] as is */ printf(_("Remove %s [y/N]? "), qname); + fflush(stdout); if (strbuf_getline(&confirm, stdin, '\n') != EOF) { strbuf_trim(&confirm); } else {