changeset 6653:2c7f279d419c v7.4.651

updated for version 7.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)
author Bram Moolenaar <bram@vim.org>
date Thu, 05 Mar 2015 17:16:06 +0100
parents 46d672c4269d
children 9ca07709d626
files src/regexp_nfa.c src/version.c
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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)
--- 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,