mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +00:00
Use do-while instead of while
This commit is contained in:
parent
681b22d5c7
commit
feec63ebb3
|
@ -712,20 +712,20 @@ static void printinfoln(const char *str)
|
||||||
|
|
||||||
static int get_input(const char *prompt)
|
static int get_input(const char *prompt)
|
||||||
{
|
{
|
||||||
int r = KEY_RESIZE;
|
int r;
|
||||||
|
|
||||||
if (prompt)
|
if (prompt)
|
||||||
printprompt(prompt);
|
printprompt(prompt);
|
||||||
cleartimeout();
|
cleartimeout();
|
||||||
#ifdef KEY_RESIZE
|
#ifdef KEY_RESIZE
|
||||||
while (r == KEY_RESIZE) {
|
do {
|
||||||
r = getch();
|
r = getch();
|
||||||
if (r == KEY_RESIZE && prompt) {
|
if (r == KEY_RESIZE && prompt) {
|
||||||
clearoldprompt();
|
clearoldprompt();
|
||||||
xlines = LINES;
|
xlines = LINES;
|
||||||
printprompt(prompt);
|
printprompt(prompt);
|
||||||
}
|
}
|
||||||
};
|
} while (r == KEY_RESIZE);
|
||||||
#else
|
#else
|
||||||
r = getch();
|
r = getch();
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue