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.
diff --git a/src/regexp.c b/src/regexp.c
index cfeee4c..3eaf74d 100644
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -5576,7 +5576,14 @@
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 @@
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