diff options
author | Arun Prakash Jana <engineerarun@gmail.com> | 2019-10-24 08:47:45 +0530 |
---|---|---|
committer | Arun Prakash Jana <engineerarun@gmail.com> | 2019-10-24 08:47:45 +0530 |
commit | 5734f49126f4da49d5f27fc27b1ca34bb13697bd (patch) | |
tree | 8a647de1158ab8197b98b7ddd093120083afbc55 | |
parent | 3dd95fd9a8e8cb4f58a76ddb34f8c8811c487980 (diff) | |
download | nnn-5734f49126f4da49d5f27fc27b1ca34bb13697bd.tar.gz |
Fix KEY_RESIZE loop
-rw-r--r-- | src/nnn.c | 16 |
1 files changed, 7 insertions, 9 deletions
@@ -588,22 +588,20 @@ static void printprompt(const char *str) static int get_input(const char *prompt) { - int r; + int r = KEY_RESIZE; if (prompt) printprompt(prompt); cleartimeout(); #ifdef KEY_RESIZE - do { + while (r == KEY_RESIZE) { r = getch(); - if (r == KEY_RESIZE) { - if (prompt) { - clearoldprompt(); - xlines = LINES; - printprompt(prompt); - } + if (r == KEY_RESIZE && prompt) { + clearoldprompt(); + xlines = LINES; + printprompt(prompt); } - } while (r == KEY_RESIZE); + }; #else r = getch(); #endif |