0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

updated for version 7.0150

This commit is contained in:
Bram Moolenaar
2005-09-25 22:20:24 +00:00
parent 1e01546026
commit 4463f296d0
8 changed files with 195 additions and 86 deletions

View File

@@ -4520,6 +4520,14 @@ do_sub(eap)
sublen = vim_regsub_multi(&regmatch, sub_firstlnum,
sub, sub_firstline, FALSE, p_magic, TRUE);
/* When the match included the "$" of the last line it may
* include one line too much. */
if (nmatch > curbuf->b_ml.ml_line_count - sub_firstlnum + 1)
{
nmatch = curbuf->b_ml.ml_line_count - sub_firstlnum + 1;
skip_match = TRUE;
}
/* Need room for:
* - result so far in new_start (not for first sub in line)
* - original text up to match