Fix KEY_RESIZE loop

This commit is contained in:
Arun Prakash Jana 2019-10-24 08:47:45 +05:30
parent 3dd95fd9a8
commit 5734f49126
No known key found for this signature in database
GPG key ID: A75979F35C080412

View file

@ -588,22 +588,20 @@ static void printprompt(const char *str)
static int get_input(const char *prompt) static int get_input(const char *prompt)
{ {
int r; int r = KEY_RESIZE;
if (prompt) if (prompt)
printprompt(prompt); printprompt(prompt);
cleartimeout(); cleartimeout();
#ifdef KEY_RESIZE #ifdef KEY_RESIZE
do { while (r == KEY_RESIZE) {
r = getch(); r = getch();
if (r == KEY_RESIZE) { if (r == KEY_RESIZE && prompt) {
if (prompt) { clearoldprompt();
clearoldprompt(); xlines = LINES;
xlines = LINES; printprompt(prompt);
printprompt(prompt);
}
} }
} while (r == KEY_RESIZE); };
#else #else
r = getch(); r = getch();
#endif #endif