aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNikolai Aleksandrovich Pavlov <kp-pav@yandex.ru>2017-07-09 11:40:46 +0300
committerJustin M. Keyes <justinkz@gmail.com>2017-07-09 10:40:46 +0200
commit702c94aacfdca34b71eadf753c21b3d92d886cf0 (patch)
treecc58c5a9727f6038a9f7bc3a4800cacbee01369f /src
parent619838f85da24d692221ba7cc310d6839ebbe2a5 (diff)
downloadrneovim-702c94aacfdca34b71eadf753c21b3d92d886cf0.tar.gz
rneovim-702c94aacfdca34b71eadf753c21b3d92d886cf0.tar.bz2
rneovim-702c94aacfdca34b71eadf753c21b3d92d886cf0.zip
mbyte: Fix crash when using multibyte chars in maparg() return (#6986)
This is a refactoring typo from #6947. Fixes #6985 Combined with #6947 where typo was made it also fixes vim/vim#1827 which was present in Neovim.
Diffstat (limited to 'src')
-rw-r--r--src/nvim/mbyte.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/mbyte.c b/src/nvim/mbyte.c
index 5b00a4b9a8..2acfb896d8 100644
--- a/src/nvim/mbyte.c
+++ b/src/nvim/mbyte.c
@@ -1780,7 +1780,7 @@ const char *mb_unescape(const char **const pp)
// Return a multi-byte character if it's found. An illegal sequence
// will result in a 1 here.
if (utf_ptr2len((const char_u *)buf) > 1) {
- *pp = (const char *)str + buf_idx + 1;
+ *pp = (const char *)str + str_idx + 1;
return buf;
}