mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 05:58:33 +00:00
vim-patch:8.1.2120: some MB_ macros are more complicated than necessary
Problem: Some MB_ macros are more complicated than necessary. (Dominique
Pelle)
Solution: Simplify the macros. Expand inline.
1614a14901
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user