comparison src/map.c @ 30007:4123e4bd1708 v9.0.0341

patch 9.0.0341: mapset() does not restore <Nop> mapping properly Commit: https://github.com/vim/vim/commit/92a3d20682d46359bb50a452b4f831659e799155 Author: zeertzjq <zeertzjq@outlook.com> Date: Wed Aug 31 16:40:17 2022 +0100 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 https://github.com/vim/vim/issues/11022)
author Bram Moolenaar <Bram@vim.org>
date Wed, 31 Aug 2022 17:45:03 +0200
parents 86eb4aba16c3
children b6b803ed4a53
comparison
equal deleted inserted replaced
30006:13cdb8fb6414 30007:4123e4bd1708
2656 { 2656 {
2657 emsg(_(e_entries_missing_in_mapset_dict_argument)); 2657 emsg(_(e_entries_missing_in_mapset_dict_argument));
2658 return; 2658 return;
2659 } 2659 }
2660 orig_rhs = rhs; 2660 orig_rhs = rhs;
2661 rhs = replace_termcodes(rhs, &arg_buf, 2661 if (STRICMP(rhs, "<nop>") == 0) // "<Nop>" means nothing
2662 rhs = (char_u *)"";
2663 else
2664 rhs = replace_termcodes(rhs, &arg_buf,
2662 REPTERM_DO_LT | REPTERM_SPECIAL, NULL); 2665 REPTERM_DO_LT | REPTERM_SPECIAL, NULL);
2663 2666
2664 noremap = dict_get_number(d, "noremap") ? REMAP_NONE: 0; 2667 noremap = dict_get_number(d, "noremap") ? REMAP_NONE: 0;
2665 if (dict_get_number(d, "script") != 0) 2668 if (dict_get_number(d, "script") != 0)
2666 noremap = REMAP_SCRIPT; 2669 noremap = REMAP_SCRIPT;