diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-04-27 21:27:58 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-04-29 15:51:04 +0800 |
commit | 3601cef1377937f01347b20a8c6c303f5f429f51 (patch) | |
tree | 95e040f01a48ea9cdb5fe8b46022aa8274b704f9 /src | |
parent | 4adf2123dd94a3d5303fe200c7e909067e1cda34 (diff) | |
download | rneovim-3601cef1377937f01347b20a8c6c303f5f429f51.tar.gz rneovim-3601cef1377937f01347b20a8c6c303f5f429f51.tar.bz2 rneovim-3601cef1377937f01347b20a8c6c303f5f429f51.zip |
feat(mappings): do not replace existing mapping for simplified form
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/getchar.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c index a26ca3f2c8..58daa9631a 100644 --- a/src/nvim/getchar.c +++ b/src/nvim/getchar.c @@ -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); |