From 640009dca3f10ec65e5e77d0ce3fa78f1e447b3c Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 17 Oct 2006 16:48:26 +0000 Subject: [PATCH] updated for version 7.0-144 --- src/regexp.c | 34 ++++++++++++++++++++-------------- src/version.c | 2 ++ 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/src/regexp.c b/src/regexp.c index 3160fb8fa..a786039ad 100644 --- a/src/regexp.c +++ b/src/regexp.c @@ -3777,8 +3777,8 @@ regmatch(scan) op = OP(scan); /* Check for character class with NL added. */ - if (!reg_line_lbr && WITH_NL(op) && *reginput == NUL - && reglnum <= reg_maxline) + if (!reg_line_lbr && WITH_NL(op) && REG_MULTI + && *reginput == NUL && reglnum <= reg_maxline) { reg_nextline(); } @@ -4855,8 +4855,8 @@ regmatch(scan) break; case NEWL: - if ((c != NUL || reglnum > reg_maxline || reg_line_lbr) - && (c != '\n' || !reg_line_lbr)) + if ((c != NUL || !REG_MULTI || reglnum > reg_maxline + || reg_line_lbr) && (c != '\n' || !reg_line_lbr)) status = RA_NOMATCH; else if (reg_line_lbr) ADVANCE_REGINPUT(); @@ -5316,8 +5316,8 @@ regrepeat(p, maxcount) ++count; mb_ptr_adv(scan); } - if (!WITH_NL(OP(p)) || reglnum > reg_maxline || reg_line_lbr - || count == maxcount) + if (!REG_MULTI || !WITH_NL(OP(p)) || reglnum > reg_maxline + || reg_line_lbr || count == maxcount) break; ++count; /* count the line-break */ reg_nextline(); @@ -5341,7 +5341,8 @@ regrepeat(p, maxcount) } else if (*scan == NUL) { - if (!WITH_NL(OP(p)) || reglnum > reg_maxline || reg_line_lbr) + if (!REG_MULTI || !WITH_NL(OP(p)) || reglnum > reg_maxline + || reg_line_lbr) break; reg_nextline(); scan = reginput; @@ -5370,7 +5371,8 @@ regrepeat(p, maxcount) } else if (*scan == NUL) { - if (!WITH_NL(OP(p)) || reglnum > reg_maxline || reg_line_lbr) + if (!REG_MULTI || !WITH_NL(OP(p)) || reglnum > reg_maxline + || reg_line_lbr) break; reg_nextline(); scan = reginput; @@ -5399,7 +5401,8 @@ regrepeat(p, maxcount) } else if (*scan == NUL) { - if (!WITH_NL(OP(p)) || reglnum > reg_maxline || reg_line_lbr) + if (!REG_MULTI || !WITH_NL(OP(p)) || reglnum > reg_maxline + || reg_line_lbr) break; reg_nextline(); scan = reginput; @@ -5424,7 +5427,8 @@ regrepeat(p, maxcount) { if (*scan == NUL) { - if (!WITH_NL(OP(p)) || reglnum > reg_maxline || reg_line_lbr) + if (!REG_MULTI || !WITH_NL(OP(p)) || reglnum > reg_maxline + || reg_line_lbr) break; reg_nextline(); scan = reginput; @@ -5454,7 +5458,8 @@ do_class: #endif if (*scan == NUL) { - if (!WITH_NL(OP(p)) || reglnum > reg_maxline || reg_line_lbr) + if (!REG_MULTI || !WITH_NL(OP(p)) || reglnum > reg_maxline + || reg_line_lbr) break; reg_nextline(); scan = reginput; @@ -5617,7 +5622,8 @@ do_class: #endif if (*scan == NUL) { - if (!WITH_NL(OP(p)) || reglnum > reg_maxline || reg_line_lbr) + if (!REG_MULTI || !WITH_NL(OP(p)) || reglnum > reg_maxline + || reg_line_lbr) break; reg_nextline(); scan = reginput; @@ -5646,8 +5652,8 @@ do_class: case NEWL: while (count < maxcount - && ((*scan == NUL && reglnum <= reg_maxline && !reg_line_lbr) - || (*scan == '\n' && reg_line_lbr))) + && ((*scan == NUL && reglnum <= reg_maxline && !reg_line_lbr + && REG_MULTI) || (*scan == '\n' && reg_line_lbr))) { count++; if (reg_line_lbr) diff --git a/src/version.c b/src/version.c index 85176f746..c2db5969d 100644 --- a/src/version.c +++ b/src/version.c @@ -666,6 +666,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 144, /**/ 143, /**/ -- 2.40.0