diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-10-06 18:52:38 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-06 18:52:38 -0700 |
commit | 23ba875b821c454e81093de83f7fd6555a4dd0c4 (patch) | |
tree | 3707321b4560e6d8b7d85d19a624ffdeaa374108 /src/nvim/getchar.c | |
parent | 8f20c50caa7fa008f5e6257ef0fc43620e3baeb1 (diff) | |
parent | 97cdfdcde24c6a804f879b6464512008db4b5cef (diff) | |
download | rneovim-23ba875b821c454e81093de83f7fd6555a4dd0c4.tar.gz rneovim-23ba875b821c454e81093de83f7fd6555a4dd0c4.tar.bz2 rneovim-23ba875b821c454e81093de83f7fd6555a4dd0c4.zip |
Merge #11170 from janlazo/vim-8.1.2120
vim-patch:8.1.2120
Diffstat (limited to 'src/nvim/getchar.c')
-rw-r--r-- | src/nvim/getchar.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c index af642a8e11..1f82df3241 100644 --- a/src/nvim/getchar.c +++ b/src/nvim/getchar.c @@ -1833,13 +1833,13 @@ static int vgetorpeek(int advance) char_u *p1 = mp->m_keys; char_u *p2 = (char_u *)mb_unescape((const char **)&p1); - if (has_mbyte && p2 != NULL && MB_BYTE2LEN(c1) > MB_PTR2LEN(p2)) + if (p2 != NULL && MB_BYTE2LEN(c1) > utfc_ptr2len(p2)) { mlen = 0; - /* - * Check an entry whether it matches. - * - Full match: mlen == keylen - * - Partly match: mlen == typebuf.tb_len - */ + } + + // Check an entry whether it matches. + // - Full match: mlen == keylen + // - Partly match: mlen == typebuf.tb_len keylen = mp->m_keylen; if (mlen == keylen || (mlen == typebuf.tb_len |