]> git.wh0rd.org Git - nano.git/commitdiff
Backport r5335 from trunk.
authorChris Allegretta <chrisa@asty.org>
Sun, 15 Nov 2015 06:42:19 +0000 (06:42 +0000)
committerChris Allegretta <chrisa@asty.org>
Sun, 15 Nov 2015 06:42:19 +0000 (06:42 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/branches/nano_2_4_branch@5411 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
src/nano.c

index 1fb3a69a7a7866d5b291c79b9d5eda04f4f91fda..a68a072d330849da53aee9c54b11cd1d76e61864 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2015-08-01  Benno Schulenberg  <bensberg@justemail.net>
+       * src/nano.c (precalc_multicolorinfo): Set each multiline-color
+       value instead of OR-ing it.  This fixes Savannah bug #45640.
+
 2015-07-29  Benno Schulenberg  <bensberg@justemail.net>
        * src/text.c (do_linter): When the linter is called in restricted mode
        (possible when nano was built with --disable-speller), it is better to
index 7fc8a429a94e59e4d6bba434c43011a2bb6c752c..534ccb31c8e3130ba56c322151a0c75f3169a410 100644 (file)
@@ -1894,7 +1894,7 @@ void precalc_multicolorinfo(void)
                    if (regexec(tmpcolor->end, &fileptr->data[startx], 1, &endmatch,
                                (startx == 0) ? 0 : REG_NOTBOL) == 0) {
                        startx += endmatch.rm_eo;
-                       fileptr->multidata[tmpcolor->id] |= CSTARTENDHERE;
+                       fileptr->multidata[tmpcolor->id] = CSTARTENDHERE;
 #ifdef DEBUG
                        fprintf(stderr, "end found on this line\n");
 #endif
@@ -1928,7 +1928,7 @@ void precalc_multicolorinfo(void)
 #endif
                    /* We found it, we found it, la la la la la.  Mark all
                     * the lines in between and the end properly. */
-                   fileptr->multidata[tmpcolor->id] |= CENDAFTER;
+                   fileptr->multidata[tmpcolor->id] = CENDAFTER;
 #ifdef DEBUG
                    fprintf(stderr, "marking line %ld as CENDAFTER\n", (long)fileptr->lineno);
 #endif
@@ -1940,7 +1940,7 @@ void precalc_multicolorinfo(void)
 #endif
                    }
                    alloc_multidata_if_needed(endptr);
-                   fileptr->multidata[tmpcolor->id] |= CBEGINBEFORE;
+                   fileptr->multidata[tmpcolor->id] = CBEGINBEFORE;
 #ifdef DEBUG
                    fprintf(stderr, "marking line %ld as CBEGINBEFORE\n", (long)fileptr->lineno);
 #endif