]> Sergey Matveev's repositories - nnn.git/commitdiff
Retire readinput()
authorArun Prakash Jana <engineerarun@gmail.com>
Wed, 25 Apr 2018 17:39:00 +0000 (23:09 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Wed, 25 Apr 2018 17:39:00 +0000 (23:09 +0530)
nnn.c

diff --git a/nnn.c b/nnn.c
index d54a18578f755a8622cd26f2e748958adcb206c8..ba68755871b9e3c84590db98682caa1e5403f717 100644 (file)
--- 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;