diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-08-31 16:40:17 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-08-31 16:40:17 +0100 |
commit | 92a3d20682d46359bb50a452b4f831659e799155 (patch) | |
tree | eb8d9cc28b75816f7b47b5ae511514f3aaf66502 /src/map.c | |
parent | a2a8973e51a0052bb52e43a2b22e7ecdecc32003 (diff) |
patch 9.0.0341: mapset() does not restore <Nop> mapping properlyv9.0.0341
Problem: mapset() does not restore <Nop> mapping properly.
Solution: Use an empty string for <Nop>. (closes #11022)
Diffstat (limited to 'src/map.c')
-rw-r--r-- | src/map.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -2658,7 +2658,10 @@ f_mapset(typval_T *argvars, typval_T *rettv UNUSED) return; } orig_rhs = rhs; - rhs = replace_termcodes(rhs, &arg_buf, + if (STRICMP(rhs, "<nop>") == 0) // "<Nop>" means nothing + rhs = (char_u *)""; + else + rhs = replace_termcodes(rhs, &arg_buf, REPTERM_DO_LT | REPTERM_SPECIAL, NULL); noremap = dict_get_number(d, "noremap") ? REMAP_NONE: 0; |