Not matching the ^ anchor when looking further on in a line.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4903 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
3be5f461f7
commit
277701f530
|
@ -1,3 +1,8 @@
|
||||||
|
2014-05-18 Benno Schulenberg <bensberg@justemail.net>
|
||||||
|
* src/nano (precalc_multicolorinfo): Do not match the ^ anchor when
|
||||||
|
looking further on in a line. This prevents an end="^$" from being
|
||||||
|
sometimes mistakenly matched. Fix inspired by Savannah bug #27708.
|
||||||
|
|
||||||
2014-05-17 Benno Schulenberg <bensberg@justemail.net>
|
2014-05-17 Benno Schulenberg <bensberg@justemail.net>
|
||||||
* doc/syntax/json.nanorc: New file, originally from Aapo Rantalainen,
|
* doc/syntax/json.nanorc: New file, originally from Aapo Rantalainen,
|
||||||
but edited, extended, and improved. See Savannah patch #7410.
|
but edited, extended, and improved. See Savannah patch #7410.
|
||||||
|
|
|
@ -1884,7 +1884,8 @@ void precalc_multicolorinfo(void)
|
||||||
goto precalc_cleanup;
|
goto precalc_cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
while ((nostart = regexec(tmpcolor->start, &fileptr->data[startx], 1, &startmatch, 0)) == 0) {
|
while ((nostart = regexec(tmpcolor->start, &fileptr->data[startx], 1, &startmatch,
|
||||||
|
(startx == 0) ? 0 : REG_NOTBOL)) == 0) {
|
||||||
/* Look for an end, and start marking how many lines are
|
/* Look for an end, and start marking how many lines are
|
||||||
* encompassed, which should speed up rendering later. */
|
* encompassed, which should speed up rendering later. */
|
||||||
startx += startmatch.rm_eo;
|
startx += startmatch.rm_eo;
|
||||||
|
@ -1893,7 +1894,8 @@ void precalc_multicolorinfo(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Look first on this line for an end. */
|
/* Look first on this line for an end. */
|
||||||
if (regexec(tmpcolor->end, &fileptr->data[startx], 1, &endmatch, 0) == 0) {
|
if (regexec(tmpcolor->end, &fileptr->data[startx], 1, &endmatch,
|
||||||
|
(startx == 0) ? 0 : REG_NOTBOL) == 0) {
|
||||||
startx += endmatch.rm_eo;
|
startx += endmatch.rm_eo;
|
||||||
fileptr->multidata[tmpcolor->id] |= CSTARTENDHERE;
|
fileptr->multidata[tmpcolor->id] |= CSTARTENDHERE;
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
|
Loading…
Reference in New Issue