src/nnn.c | 16 ++++++++-------- diff --git a/src/nnn.c b/src/nnn.c index 98f6d2ac081963ee0188f60bef5cb464177497fa..de172e2775b6992f7740923bc681b2d1ea51a318 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -822,22 +822,22 @@ } static int get_input(const char *prompt) { - int r; - if (prompt) printmsg(prompt); cleartimeout(); + + int r = getch(); + #ifdef KEY_RESIZE - do { - r = getch(); - if (r == KEY_RESIZE && prompt) { + while (r == KEY_RESIZE) { + if (prompt) { clearoldprompt(); xlines = LINES; printmsg(prompt); } - } while (r == KEY_RESIZE); -#else - r = getch(); + + r = getch(); + } #endif settimeout(); return r;