summaryrefslogtreecommitdiff
path: root/src/regexp.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-06-01 19:54:43 +0200
committerBram Moolenaar <Bram@vim.org>2013-06-01 19:54:43 +0200
commit61602c5bfe7d4a4a0a6671b132f5b98d7d9da424 (patch)
treefda5a8fcf6a325647deaf4b25c5071bbe8b5357c /src/regexp.c
parent543b7ef7000d08d77409478315d68b607bb8bad8 (diff)
downloadvim-git-61602c5bfe7d4a4a0a6671b132f5b98d7d9da424.tar.gz
updated for version 7.3.1088v7.3.1088
Problem: New regexp engine: \@<= and \@<! are not implemented. Solution: Implement look-behind matching. Fix off-by-one error in old regexp engine.
Diffstat (limited to 'src/regexp.c')
-rw-r--r--src/regexp.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/regexp.c b/src/regexp.c
index cfeee4c27..3eaf74dd9 100644
--- a/src/regexp.c
+++ b/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