Skip to content

Commit

Permalink
Retire readinput()
Browse files Browse the repository at this point in the history
  • Loading branch information
jarun committed Apr 25, 2018
1 parent 4fbb36b commit 6dc4176
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions nnn.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -2833,9 +2819,7 @@ browse(char *ipath, char *ifilter)
presel = FILTER;
goto begin;
case SEL_CDBM:
printprompt("key: ");
tmp = readinput();
clearprompt();
tmp = xreadline(NULL, "key: ");
if (tmp == NULL || tmp[0] == '\0')
break;

Expand Down

0 comments on commit 6dc4176

Please sign in to comment.