mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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:
parent
421da79d30
commit
3b615980c8
@ -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;
|
||||
}
|
||||
|
||||
|
@ -273,7 +273,7 @@ static int included_patches[] = {
|
||||
// 654,
|
||||
653,
|
||||
// 652,
|
||||
// 651,
|
||||
651,
|
||||
// 650 NA
|
||||
// 649,
|
||||
// 648 NA
|
||||
|
Loading…
Reference in New Issue
Block a user