mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 13:51:31 +00:00
Properly handle empty filters
This commit is contained in:
parent
ea0cce7b63
commit
30ca80310a
3
noice.c
3
noice.c
|
@ -331,10 +331,11 @@ readln(void)
|
||||||
|
|
||||||
echo();
|
echo();
|
||||||
curs_set(TRUE);
|
curs_set(TRUE);
|
||||||
|
memset(ln, 0, sizeof(ln));
|
||||||
getnstr(ln, sizeof(ln) - 1);
|
getnstr(ln, sizeof(ln) - 1);
|
||||||
noecho();
|
noecho();
|
||||||
curs_set(FALSE);
|
curs_set(FALSE);
|
||||||
return strdup(ln);
|
return strlen(ln) ? strdup(ln) : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue