aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar lostd <lostd@2f30.org>2015-01-27 09:55:07 +0200
committerGravatar lostd <lostd@2f30.org>2015-01-27 09:55:07 +0200
commit48e3305be834bf0877a16ec5e855e66fb1787bd7 (patch)
treeea558cfff76c5d76b6583648a16260763b04db52
parent9679e132d48dc6e39e3e4e0798aed75696784ba3 (diff)
downloadnnn-48e3305be834bf0877a16ec5e855e66fb1787bd7.tar.gz
Empty filter resets filter to the default
-rw-r--r--noice.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/noice.c b/noice.c
index bd35eaa..8fe7f98 100644
--- a/noice.c
+++ b/noice.c
@@ -664,10 +664,8 @@ nochange:
/* Read filter */
printprompt("filter: ");
tmp = readln();
- if (tmp == NULL) {
- clearprompt();
- goto nochange;
- }
+ if (tmp == NULL)
+ tmp = xstrdup(ifilter);
r = setfilter(&re, tmp);
if (r != 0) {
free(tmp);