diff options
| author | 2019-12-10 18:25:00 +0530 | |
|---|---|---|
| committer | 2019-12-10 18:37:10 +0530 | |
| commit | 8d143bb87ffe3083aaa15fdd6a3d8b085819371f (patch) | |
| tree | 7593af63cd07789bc2a1cbd55593e324408c7bb3 /src | |
| parent | e8183058fd71dcaa8170e48bb731f7dc0f9f4c57 (diff) | |
| download | nnn-8d143bb87ffe3083aaa15fdd6a3d8b085819371f.tar.gz | |
Disable partial regex errors
Diffstat (limited to 'src')
| -rw-r--r-- | src/nnn.c | 11 |
1 files changed, 4 insertions, 7 deletions
@@ -1801,12 +1801,7 @@ static char xchartohex(char c) static int setfilter(regex_t *regex, const char *filter) { - int r = regcomp(regex, filter, REG_NOSUB | REG_EXTENDED | REG_ICASE); - - if (r != 0 && filter && filter[0] != '\0') - mvprintw(xlines - 1, 0, "regex error: %d\n", r); - - return r; + return regcomp(regex, filter, REG_NOSUB | REG_EXTENDED | REG_ICASE); } static int visible_re(const fltrexp_t *fltrexp, const char *fname) @@ -2131,8 +2126,10 @@ static int filterentries(char *path) */ /* ndents = total; */ - if (matches(pln) == -1) + if (matches(pln) == -1) { + printprompt(ln); continue; + } /* If the only match is a dir, auto-select and cd into it */ if (ndents == 1 && cfg.filtermode |