forked from aniani/vim
updated for version 7.3.1088
Problem: New regexp engine: \@<= and \@<! are not implemented. Solution: Implement look-behind matching. Fix off-by-one error in old regexp engine.
This commit is contained in:
16
src/regexp.c
16
src/regexp.c
@@ -5576,7 +5576,14 @@ regmatch(scan)
|
||||
limit = OPERAND_MIN(rp->rs_scan);
|
||||
if (REG_MULTI)
|
||||
{
|
||||
if (rp->rs_un.regsave.rs_u.pos.col == 0)
|
||||
if (limit > 0
|
||||
&& ((rp->rs_un.regsave.rs_u.pos.lnum
|
||||
< behind_pos.rs_u.pos.lnum
|
||||
? (colnr_T)STRLEN(regline)
|
||||
: behind_pos.rs_u.pos.col)
|
||||
- rp->rs_un.regsave.rs_u.pos.col >= limit))
|
||||
no = FAIL;
|
||||
else if (rp->rs_un.regsave.rs_u.pos.col == 0)
|
||||
{
|
||||
if (rp->rs_un.regsave.rs_u.pos.lnum
|
||||
< behind_pos.rs_u.pos.lnum
|
||||
@@ -5601,13 +5608,6 @@ regmatch(scan)
|
||||
else
|
||||
#endif
|
||||
--rp->rs_un.regsave.rs_u.pos.col;
|
||||
if (limit > 0
|
||||
&& ((rp->rs_un.regsave.rs_u.pos.lnum
|
||||
< behind_pos.rs_u.pos.lnum
|
||||
? (colnr_T)STRLEN(regline)
|
||||
: behind_pos.rs_u.pos.col)
|
||||
- rp->rs_un.regsave.rs_u.pos.col > limit))
|
||||
no = FAIL;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user