patch 8.2.4861: it is not easy to restore saved mappings
Problem: It is not easy to restore saved mappings.
Solution: Make mapset() accept a dict argument. (Ernie Rael, closes #10295)
diff --git a/src/typval.c b/src/typval.c
index 4f6e41d..b131ba2 100644
--- a/src/typval.c
+++ b/src/typval.c
@@ -360,6 +360,20 @@
#endif
/*
+ * Give an error and return FAIL unless "args[idx]" is unknown
+ */
+ int
+check_for_unknown_arg(typval_T *args, int idx)
+{
+ if (args[idx].v_type != VAR_UNKNOWN)
+ {
+ semsg(_(e_too_many_arguments), idx + 1);
+ return FAIL;
+ }
+ return OK;
+}
+
+/*
* Give an error and return FAIL unless "args[idx]" is a string.
*/
int