1
0
forked from aniani/vim

updated for version 7.4.101

Problem:    Using \1 in pattern goes one line too far. (Bohr Shaw, John Little)
Solution:   Only advance the match end for the matched characters in the last
            line.
This commit is contained in:
Bram Moolenaar
2013-11-21 17:13:00 +01:00
parent 272fb58236
commit 438ee5bf60
4 changed files with 11 additions and 1 deletions

View File

@@ -6455,7 +6455,8 @@ re_num_cmp(val, scan)
/*
* Check whether a backreference matches.
* Returns RA_FAIL, RA_NOMATCH or RA_MATCH.
* If "bytelen" is not NULL, it is set to the bytelength of the whole match.
* If "bytelen" is not NULL, it is set to the byte length of the match in the
* last line.
*/
static int
match_with_backref(start_lnum, start_col, end_lnum, end_col, bytelen)
@@ -6511,6 +6512,8 @@ match_with_backref(start_lnum, start_col, end_lnum, end_col, bytelen)
/* Advance to next line. */
reg_nextline();
if (bytelen != NULL)
*bytelen = 0;
++clnum;
ccol = 0;
if (got_int)