mirror of
https://github.com/neovim/neovim.git
synced 2025-10-09 19:36:40 +00:00
Ensure :lmap mappings take preference
If the mental model of :lmap mappings is a translation between your keyboard and vim proper, then they should take preference over :imap (and other) mappings. This patch makes that happen.
This commit is contained in:
@@ -1844,8 +1844,11 @@ static int vgetorpeek(int advance)
|
|||||||
keylen = KEYLEN_PART_MAP;
|
keylen = KEYLEN_PART_MAP;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else if (keylen > mp_match_len) {
|
} else if (keylen > mp_match_len
|
||||||
/* found a longer match */
|
|| (keylen == mp_match_len
|
||||||
|
&& (mp_match->m_mode & LANGMAP) == 0
|
||||||
|
&& (mp->m_mode & LANGMAP) != 0)) {
|
||||||
|
// found a longer match
|
||||||
mp_match = mp;
|
mp_match = mp;
|
||||||
mp_match_len = keylen;
|
mp_match_len = keylen;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user