aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShougo Matsushita <Shougo.Matsu@gmail.com>2015-11-10 21:12:27 +0900
committerFlorian Walch <florian@fwalch.com>2015-11-10 18:26:35 +0100
commit3b615980c814eff3fa284dd07b61fbf50885f4ab (patch)
treec1ac95eb3f1c592236bf0c49142f30388017659c
parent421da79d3083b3fdb8d9c99c259e0e2d985e91c8 (diff)
downloadrneovim-3b615980c814eff3fa284dd07b61fbf50885f4ab.tar.gz
rneovim-3b615980c814eff3fa284dd07b61fbf50885f4ab.tar.bz2
rneovim-3b615980c814eff3fa284dd07b61fbf50885f4ab.zip
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) https://github.com/vim/vim/commit/4f36dc3bf7118a3fa5ccdae1a37963860dc71e6c
-rw-r--r--src/nvim/regexp_nfa.c2
-rw-r--r--src/nvim/version.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/regexp_nfa.c b/src/nvim/regexp_nfa.c
index 4cd422400f..fa356da5b9 100644
--- a/src/nvim/regexp_nfa.c
+++ b/src/nvim/regexp_nfa.c
@@ -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;
}
diff --git a/src/nvim/version.c b/src/nvim/version.c
index 6485195472..7c8f16ee40 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -273,7 +273,7 @@ static int included_patches[] = {
// 654,
653,
// 652,
- // 651,
+ 651,
// 650 NA
// 649,
// 648 NA