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)
{
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