vim-patch:7.4.651 #3644

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)

4f36dc3bf7
This commit is contained in:
Shougo Matsushita 2015-11-10 21:12:27 +09:00 committed by Florian Walch
parent 421da79d30
commit 3b615980c8
2 changed files with 2 additions and 2 deletions

View File

@ -5761,7 +5761,7 @@ static int nfa_regmatch(nfa_regprog_T *prog, nfa_state_T *start, regsubs_T *subm
// 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 * (has_mbyte ? MB_MAXBYTES : 1)) {
break;
}

View File

@ -273,7 +273,7 @@ static int included_patches[] = {
// 654,
653,
// 652,
// 651,
651,
// 650 NA
// 649,
// 648 NA