summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <bram@vim.org>2015-03-05 17:16:06 +0100
committerBram Moolenaar <bram@vim.org>2015-03-05 17:16:06 +0100
commitfbfe8caa5ed2ee9931e8e13f4ff951d6d1155646 (patch)
tree4bf1ba3f46b1bbfafd900a88fcba2d5af47ee017
parent8534f60eb990d65febef5728ef5c60955f220125 (diff)
downloadvim-fbfe8caa5ed2ee9931e8e13f4ff951d6d1155646.tar.gz
updated for version 7.4.651v7.4.651v7-4-651
Problem: Can't match "%>80v" properly for multi-byte characters. Solution: Multiply the character number by the maximum number of bytes in a character. (Yasuhiro Matsumoto)
-rw-r--r--src/regexp_nfa.c6
-rw-r--r--src/version.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c
index 22453510..e67f6380 100644
--- a/src/regexp_nfa.c
+++ b/src/regexp_nfa.c
@@ -6477,7 +6477,11 @@ nfa_regmatch(prog, start, submatch, m)
/* Bail out quickly when there can't be a match, avoid the
* overhead of win_linetabsize() on long lines. */
- if (op != 1 && col > t->state->val)
+ if (op != 1 && col > t->state->val
+#ifdef FEAT_MBYTE
+ * (has_mbyte ? MB_MAXBYTES : 1)
+#endif
+ )
break;
result = FALSE;
if (op == 1 && col - 1 > t->state->val && col > 100)
diff --git a/src/version.c b/src/version.c
index 92fec408..cd788b00 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 651,
+/**/
650,
/**/
649,