Keep last valid state on regex errors

This commit is contained in:
lostd 2015-01-27 14:38:37 +02:00
parent cacd576240
commit ab0c9e5921

View file

@ -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)