summaryrefslogtreecommitdiff
path: root/src/regexp.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-01-30 13:59:37 +0100
committerBram Moolenaar <Bram@vim.org>2013-01-30 13:59:37 +0100
commitf813a1883f767ad9c4a7a44b5f42cee312d53bc0 (patch)
treed9b6149762cad2f6069933a2f45e84c637c1f670 /src/regexp.c
parent8d616172389a666e74c47c4e41f5cd9a17a38268 (diff)
downloadvim-git-f813a1883f767ad9c4a7a44b5f42cee312d53bc0.tar.gz
updated for version 7.3.789v7.3.789
Problem: "\k" in regexp does not work in other window. Solution: Use the right buffer. (Yukihiro Nakadaira)
Diffstat (limited to 'src/regexp.c')
-rw-r--r--src/regexp.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/regexp.c b/src/regexp.c
index e62aae557..b6506a03a 100644
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -4013,8 +4013,8 @@ static int reg_prev_class __ARGS((void));
reg_prev_class()
{
if (reginput > regline)
- return mb_get_class(reginput - 1
- - (*mb_head_off)(regline, reginput - 1));
+ return mb_get_class_buf(reginput - 1
+ - (*mb_head_off)(regline, reginput - 1), reg_buf);
return -1;
}
@@ -4304,7 +4304,7 @@ regmatch(scan)
int this_class;
/* Get class of current and previous char (if it exists). */
- this_class = mb_get_class(reginput);
+ this_class = mb_get_class_buf(reginput, reg_buf);
if (this_class <= 1)
status = RA_NOMATCH; /* not on a word at all */
else if (reg_prev_class() == this_class)
@@ -4328,7 +4328,7 @@ regmatch(scan)
int this_class, prev_class;
/* Get class of current and previous char (if it exists). */
- this_class = mb_get_class(reginput);
+ this_class = mb_get_class_buf(reginput, reg_buf);
prev_class = reg_prev_class();
if (this_class == prev_class
|| prev_class == 0 || prev_class == 1)
@@ -4365,14 +4365,14 @@ regmatch(scan)
break;
case KWORD:
- if (!vim_iswordp(reginput))
+ if (!vim_iswordp_buf(reginput, reg_buf))
status = RA_NOMATCH;
else
ADVANCE_REGINPUT();
break;
case SKWORD:
- if (VIM_ISDIGIT(*reginput) || !vim_iswordp(reginput))
+ if (VIM_ISDIGIT(*reginput) || !vim_iswordp_buf(reginput, reg_buf))
status = RA_NOMATCH;
else
ADVANCE_REGINPUT();
@@ -5734,7 +5734,8 @@ regrepeat(p, maxcount)
case SKWORD + ADD_NL:
while (count < maxcount)
{
- if (vim_iswordp(scan) && (testval || !VIM_ISDIGIT(*scan)))
+ if (vim_iswordp_buf(scan, reg_buf)
+ && (testval || !VIM_ISDIGIT(*scan)))
{
mb_ptr_adv(scan);
}