vim-patch:9.1.0814: mapset() may remove unrelated mapping (#30941)

Problem:  mapset() may remove unrelated mapping whose {rhs} matches the
          restored mapping's {lhs}.
Solution: only match by {lhs} when unmapping for mapset() (zeertzjq).

closes: vim/vim#15935

fdf135a052
This commit is contained in:
zeertzjq
2024-10-25 07:16:54 +08:00
committed by GitHub
parent 54249d051c
commit e4a74e986c
3 changed files with 37 additions and 9 deletions

View File

@@ -19,9 +19,10 @@
/// Used for the first argument of do_map()
enum {
MAPTYPE_MAP = 0,
MAPTYPE_UNMAP = 1,
MAPTYPE_NOREMAP = 2,
MAPTYPE_MAP = 0,
MAPTYPE_UNMAP = 1,
MAPTYPE_NOREMAP = 2,
MAPTYPE_UNMAP_LHS = 3,
};
/// Adjust chars in a language according to 'langmap' option.