0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

updated for version 7.0007

This commit is contained in:
Bram Moolenaar
2004-07-10 09:47:34 +00:00
parent 325b7a2fb5
commit 8299df966a
54 changed files with 3573 additions and 2586 deletions

View File

@@ -3738,6 +3738,7 @@ do_sub(eap)
unsigned len, needed_len;
long nmatch_tl = 0; /* nr of lines matched below lnum */
int do_again; /* do it again after joining lines */
int skip_match = FALSE;
/*
* The new text is build up step by step, to avoid too much
@@ -3822,7 +3823,12 @@ do_sub(eap)
&& regmatch.endpos[0].lnum == 0
&& matchcol == regmatch.endpos[0].col)
{
++matchcol; /* search for a match at next column */
if (sub_firstline[matchcol] == NUL)
/* We already were at the end of the line. Don't look
* for a match in this line again. */
skip_match = TRUE;
else
++matchcol; /* search for a match at next column */
goto skip;
}
@@ -4114,9 +4120,12 @@ skip:
/* We already know that we did the last subst when we are at
* the end of the line, except that a pattern like
* "bar\|\nfoo" may match at the NUL. */
lastone = ((sub_firstline[matchcol] == NUL && nmatch <= 1
&& !re_multiline(regmatch.regprog))
|| got_int || got_quit || !(do_all || do_again));
lastone = (skip_match
|| got_int
|| got_quit
|| !(do_all || do_again)
|| (sub_firstline[matchcol] == NUL && nmatch <= 1
&& !re_multiline(regmatch.regprog)));
nmatch = -1;
/*