nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 36618f1dcab41a6eb5c52c1b27a8ea95db785054
parent 3ea2694d9c0f590fda7973d519936b0578eac449
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Fri, 29 Jan 2021 09:53:39 +0100

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

Diffstat:
Msrc/color.c | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git 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. */