Mercurial > vim
comparison src/regexp_bt.c @ 34671:df52075b12cd v9.1.0217
patch 9.1.0217: regexp: verymagic cannot match before/after a mark
Commit: https://github.com/vim/vim/commit/46fa3c7e271eb2abb05a0d9e6dbc9c36c2b2da02
Author: Julio B <julio.bacel@gmail.com>
Date: Thu Mar 28 10:23:37 2024 +0100
patch 9.1.0217: regexp: verymagic cannot match before/after a mark
Problem: regexp: verymagic cannot match before/after a mark
Solution: Correctly check for the very magic check (Julio B)
Fix regexp parser for \v%>'m and \v%<'m
Currently \v%'m works fine, but it is unable to match before or after
the position of mark m.
closes: #14309
Signed-off-by: Julio B <julio.bacel@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 28 Mar 2024 10:30:04 +0100 |
parents | 90063f44c99a |
children | 97b5457962ed |
comparison
equal
deleted
inserted
replaced
34670:879a61a9aa07 | 34671:df52075b12cd |
---|---|
1639 { | 1639 { |
1640 got_digit = TRUE; | 1640 got_digit = TRUE; |
1641 n = n * 10 + (c - '0'); | 1641 n = n * 10 + (c - '0'); |
1642 c = getchr(); | 1642 c = getchr(); |
1643 } | 1643 } |
1644 if (c == '\'' && n == 0) | 1644 if (no_Magic(c) == '\'' && n == 0) |
1645 { | 1645 { |
1646 // "\%'m", "\%<'m" and "\%>'m": Mark | 1646 // "\%'m", "\%<'m" and "\%>'m": Mark |
1647 c = getchr(); | 1647 c = getchr(); |
1648 ret = regnode(RE_MARK); | 1648 ret = regnode(RE_MARK); |
1649 if (ret == JUST_CALC_SIZE) | 1649 if (ret == JUST_CALC_SIZE) |