Simplify get_input()

This commit is contained in:
Arun Prakash Jana 2020-05-31 20:10:11 +05:30
parent 984cffecc4
commit 4a2d978630
No known key found for this signature in database
GPG Key ID: A75979F35C080412
1 changed files with 8 additions and 8 deletions

View File

@ -822,22 +822,22 @@ static inline bool xconfirm(int c)
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;