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:
@@ -4520,6 +4520,14 @@ do_sub(eap)
|
||||
sublen = vim_regsub_multi(®match, 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
|
||||
|
Reference in New Issue
Block a user