diff options
author | Bram Moolenaar <Bram@vim.org> | 2015-03-05 17:16:06 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2015-03-05 17:16:06 +0100 |
commit | 4f36dc3bf7118a3fa5ccdae1a37963860dc71e6c (patch) | |
tree | 27504f5533674af149e8e9f6c62920b94ad5fbbe /src/regexp_nfa.c | |
parent | 5d3fbf3bfea3b698f42a44c2732e58fa63f01446 (diff) | |
download | vim-git-4f36dc3bf7118a3fa5ccdae1a37963860dc71e6c.tar.gz |
updated for version 7.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)
Diffstat (limited to 'src/regexp_nfa.c')
-rw-r--r-- | src/regexp_nfa.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c index 224535109..e67f6380c 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) |