Browse Source

Simplify get_input()

master
Arun Prakash Jana 4 years ago
parent
commit
4a2d978630
No known key found for this signature in database GPG Key ID: A75979F35C080412
1 changed files with 8 additions and 8 deletions
  1. +8
    -8
      src/nnn.c

+ 8
- 8
src/nnn.c View File

@@ -822,22 +822,22 @@ static inline bool xconfirm(int c)


static int get_input(const char *prompt) static int get_input(const char *prompt)
{ {
int r;

if (prompt) if (prompt)
printmsg(prompt); printmsg(prompt);
cleartimeout(); cleartimeout();

int r = getch();

#ifdef KEY_RESIZE #ifdef KEY_RESIZE
do {
r = getch();
if (r == KEY_RESIZE && prompt) {
while (r == KEY_RESIZE) {
if (prompt) {
clearoldprompt(); clearoldprompt();
xlines = LINES; xlines = LINES;
printmsg(prompt); printmsg(prompt);
} }
} while (r == KEY_RESIZE);
#else
r = getch();
r = getch();
}
#endif #endif
settimeout(); settimeout();
return r; return r;


Loading…
Cancel
Save