0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 9.0.0341: mapset() does not restore <Nop> mapping properly

Problem:    mapset() does not restore <Nop> mapping properly.
Solution:   Use an empty string for <Nop>. (closes #11022)
This commit is contained in:
zeertzjq
2022-08-31 16:40:17 +01:00
committed by Bram Moolenaar
parent a2a8973e51
commit 92a3d20682
3 changed files with 33 additions and 7 deletions

View File

@@ -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;