0
0
mirror of https://github.com/vim/vim.git synced 2025-10-13 06:54:15 -04:00

patch 8.2.1577: Vim9: hasmapto()/mapcheck()/maparg() do nottake "true" arg

Problem:    Vim9: hasmapto(), mapcheck() and maparg() do not take "true" as
            argument.
Solution:   Use tv_get_bool(). (closes #6822, closes #6824)
This commit is contained in:
Bram Moolenaar
2020-09-02 22:25:35 +02:00
parent 6c553f9c04
commit 04d594b9c1
4 changed files with 44 additions and 3 deletions

View File

@@ -4808,7 +4808,7 @@ f_hasmapto(typval_T *argvars, typval_T *rettv)
{
mode = tv_get_string_buf(&argvars[1], buf);
if (argvars[2].v_type != VAR_UNKNOWN)
abbr = (int)tv_get_number(&argvars[2]);
abbr = (int)tv_get_bool(&argvars[2]);
}
if (map_to_exists(name, mode, abbr))