diff options
Diffstat (limited to 'src/nvim/mapping.c')
-rw-r--r-- | src/nvim/mapping.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/mapping.c b/src/nvim/mapping.c index 1887afef1c..68a3778a47 100644 --- a/src/nvim/mapping.c +++ b/src/nvim/mapping.c @@ -596,13 +596,13 @@ static int buf_do_map(int maptype, MapArguments *args, int mode, bool is_abbrev, int last = first; p = (char *)lhs + utfc_ptr2len((char *)lhs); n = 1; - while (p < (char *)lhs + len) { + while (p < lhs + len) { n++; // nr of (multi-byte) chars last = vim_iswordp(p); // type of last char if (same == -1 && last != first) { same = n - 1; // count of same char type } - p += utfc_ptr2len((char *)p); + p += utfc_ptr2len(p); } if (last && n > 2 && same >= 0 && same < n - 1) { retval = 1; |