0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

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)
This commit is contained in:
Ernie Rael
2022-05-04 15:40:22 +01:00
committed by Bram Moolenaar
parent 05cf63e9bd
commit 51d04d16f2
9 changed files with 323 additions and 29 deletions

View File

@@ -359,6 +359,20 @@ tv_get_float(typval_T *varp)
}
#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.
*/