aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-01-16 23:09:19 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-01-16 23:09:19 +0530
commitfeec63ebb382b7e92dc6d4a2b767f89dc1ab4c7b (patch)
tree184ac18861481bee15bec1176ac0ac6647c71823 /src
parent681b22d5c76356912fe29eb5769a92634329ad9b (diff)
downloadnnn-feec63ebb382b7e92dc6d4a2b767f89dc1ab4c7b.tar.gz
Use do-while instead of while
Diffstat (limited to 'src')
-rw-r--r--src/nnn.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nnn.c b/src/nnn.c
index 63b6c03..cec4b7c 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -712,20 +712,20 @@ static void printinfoln(const char *str)
static int get_input(const char *prompt)
{
- int r = KEY_RESIZE;
+ int r;
if (prompt)
printprompt(prompt);
cleartimeout();
#ifdef KEY_RESIZE
- while (r == KEY_RESIZE) {
+ do {
r = getch();
if (r == KEY_RESIZE && prompt) {
clearoldprompt();
xlines = LINES;
printprompt(prompt);
}
- };
+ } while (r == KEY_RESIZE);
#else
r = getch();
#endif