aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2018-11-07 22:13:56 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2018-11-07 22:13:56 +0530
commit41db3c460f2c626c2cefd92ae78973f52a9563ae (patch)
treefb08672bf91e5980dd69a102eb54f8915d84180b
parent5a92f647f41ef75501b518a0b5b491cfc5fe8914 (diff)
downloadnnn-41db3c460f2c626c2cefd92ae78973f52a9563ae.tar.gz
Reorder operations
-rw-r--r--nnn.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/nnn.c b/nnn.c
index 4921a7b..8fd177d 100644
--- a/nnn.c
+++ b/nnn.c
@@ -1297,14 +1297,13 @@ static char *xreadline(char *fname, char *prompt)
}
END:
- buf[len] = '\0';
-
curs_set(FALSE);
settimeout();
+ clearprompt();
+ buf[len] = '\0';
DPRINTF_S(buf);
wcstombs(g_buf + ((NAME_MAX + 1) << 4), buf, NAME_MAX);
- clearprompt();
return g_buf + ((NAME_MAX + 1) << 4);
}