* src/nano.c (do_output): Let reset_multis() figure out whether after
an addition a full refresh is needed (for multiline-regexes' sake),
instead of doing it always.
+ * src/color.c (reset_multis): Abort when having no multiline regexes.
2016-01-02 Benno Schulenberg <bensberg@justemail.net>
* src/text.c (do_spell, do_formatter): Plug three tiny memory leaks.
regmatch_t startmatch, endmatch;
const colortype *tmpcolor = openfile->colorstrings;
- if (!openfile->syntax)
+ /* If there is no syntax or no multiline regex, there is nothing to do. */
+ if (openfile->syntax == NULL || openfile->syntax->nmultis == 0)
return;
for (; tmpcolor != NULL; tmpcolor = tmpcolor->next) {
/* Execute the function of the shortcut. */
s->scfunc();
#ifndef DISABLE_COLOR
- if (f && !f->viewok && openfile->syntax != NULL
- && openfile->syntax->nmultis > 0)
+ if (f && !f->viewok)
reset_multis(openfile->current, FALSE);
#endif
if (edit_refresh_needed) {