feat(mappings): do not replace existing mapping for simplified form

This commit is contained in:
zeertzjq
2022-04-27 21:27:58 +08:00
parent 4adf2123dd
commit 3601cef137
3 changed files with 51 additions and 15 deletions

View File

@@ -3279,6 +3279,11 @@ int buf_do_map(int maptype, MapArguments *args, int mode, bool is_abbrev, buf_T
} else if (n != len) { // new entry is ambiguous
mpp = &(mp->m_next);
continue;
} else if (keyround1_simplified && !mp->m_simplified) {
// In keyround for simplified keys, don't replace
// a mapping without m_simplified flag.
did_it = true;
break;
} else if (args->unique) {
if (is_abbrev) {
semsg(_("E226: abbreviation already exists for %s"), p);