From 36618f1dcab41a6eb5c52c1b27a8ea95db785054 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Fri, 29 Jan 2021 09:53:39 +0100 Subject: [PATCH] tweaks: don't bother comparing virgin multidata with current situation The initialization of -1 cannot possibly match with NOTHING or WHOLELINE or the other available values. (Also, put in a warning, as I don't think an onscreen line without a multidata cache can occur at all.) --- src/color.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/color.c b/src/color.c index ec9817d7..12417ccb 100644 --- a/src/color.c +++ b/src/color.c @@ -253,8 +253,12 @@ void check_the_multis(linestruct *line) if (openfile->syntax == NULL || openfile->syntax->nmultis == 0) return; - if (line->multidata == NULL) - set_up_multicache(line); + if (line->multidata == NULL) { + statusline(ALERT, "Onscreen line without multidata?"); + napms(1200); + refresh_needed = TRUE; + return; + } for (ink = openfile->syntax->color; ink != NULL; ink = ink->next) { /* If it's not a multiline regex, skip. */