patch 9.1.0814: mapset() may remove unrelated mapping
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: #15935
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/vim.h b/src/vim.h
index 387fe4f..74e6b95 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -1013,9 +1013,10 @@
#define KEY_COMPLETE 0x103 // end of completion
// Used for the first argument of do_map()
-#define MAPTYPE_MAP 0
-#define MAPTYPE_UNMAP 1
-#define MAPTYPE_NOREMAP 2
+#define MAPTYPE_MAP 0
+#define MAPTYPE_UNMAP 1
+#define MAPTYPE_NOREMAP 2
+#define MAPTYPE_UNMAP_LHS 3
// Values for "noremap" argument of ins_typebuf(). Also used for
// map->m_noremap and menu->noremap[].