aboutsummaryrefslogtreecommitdiffstats
path: root/nnn.c
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2018-04-25 23:09:00 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2018-04-25 23:09:00 +0530
commit6dc4176f5790ed1fad722f111cf71383bd33f660 (patch)
tree2f7ff068601ef63891fc4dfbddce0fadcb5664bd /nnn.c
parent4fbb36b66b9fa1f774041b59fdd65a044dddbd81 (diff)
downloadnnn-6dc4176f5790ed1fad722f111cf71383bd33f660.tar.gz
Retire readinput()
Diffstat (limited to 'nnn.c')
-rw-r--r--nnn.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/nnn.c b/nnn.c
index d54a185..ba68755 100644
--- a/nnn.c
+++ b/nnn.c
@@ -1327,20 +1327,6 @@ xreadline(char *fname, char *prompt)
return g_buf;
}
-static char *
-readinput(void)
-{
- cleartimeout();
- echo();
- curs_set(TRUE);
- memset(g_buf, 0, NAME_MAX + 1);
- wgetnstr(stdscr, g_buf, NAME_MAX);
- noecho();
- curs_set(FALSE);
- settimeout();
- return g_buf[0] ? g_buf : NULL;
-}
-
/*
* Updates out with "dir/name or "/name"
* Returns the number of bytes copied including the terminating NULL byte
@@ -2833,9 +2819,7 @@ nochange:
presel = FILTER;
goto begin;
case SEL_CDBM:
- printprompt("key: ");
- tmp = readinput();
- clearprompt();
+ tmp = xreadline(NULL, "key: ");
if (tmp == NULL || tmp[0] == '\0')
break;