From: Benno Schulenberg Date: Sun, 29 Nov 2015 10:07:49 +0000 (+0000) Subject: Evaluating correctly whether to reset the multidata cache. X-Git-Tag: v2.5.0~35 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=f9a6eb8bec42e7be5814b454d687fa7b057056b5;p=nano.git Evaluating correctly whether to reset the multidata cache. This fixes Savannah bug #46543. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5448 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index db4eece6..c0b164b8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2015-11-29 Benno Schulenberg + * src/color.c (reset_multis): Evaluate correctly whether to reset + the multidata cache. This fixes Savannah bug #46543. + 2015-11-28 Benno Schulenberg * src/nano.c (main): Allow the user full control over the values of MALLOC_CHECK_ and MALLOC_PERTURB_; nano shouldn't override these. diff --git a/src/color.c b/src/color.c index bb6f9eff..88ff3f1e 100644 --- a/src/color.c +++ b/src/color.c @@ -457,7 +457,7 @@ void reset_multis(filestruct *fileptr, bool force) } else if (fileptr->multidata[tmpcolor->id] == CNONE) { if (nobegin && noend) continue; - } else if (fileptr->multidata[tmpcolor->id] & CBEGINBEFORE && !noend + } else if (fileptr->multidata[tmpcolor->id] == CBEGINBEFORE && !noend && (nobegin || endmatch.rm_eo > startmatch.rm_eo)) { reset_multis_after(fileptr, tmpcolor->id); continue;