diff options
author | lostd <lostd@2f30.org> | 2015-01-27 14:38:37 +0200 |
---|---|---|
committer | lostd <lostd@2f30.org> | 2015-01-27 14:38:37 +0200 |
commit | ab0c9e592146fefe4298cdc3e061bfb8f8a8fb1f (patch) | |
tree | 0421dd9a058e6ea0550bc6dbc31383a02d33636b | |
parent | cacd576240f61a3bfb1da47c58446c20bec31cb3 (diff) | |
download | nnn-ab0c9e592146fefe4298cdc3e061bfb8f8a8fb1f.tar.gz |
Keep last valid state on regex errors
-rw-r--r-- | noice.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -749,8 +749,13 @@ moretyping: /* Check regex errors */ if (tmp != NULL) r = setfilter(&re, tmp); - if (r != 0 && nowtyping) - goto moretyping; + if (r != 0) + if (nowtyping) { + goto moretyping; + } else { + free(tmp); + goto nochange; + } /* Copy or reset filter */ free(filter); if (tmp != NULL) |