diff src/map.c @ 22468:990b47e15cd7 v8.2.1782

patch 8.2.1782: Vim9: cannot pass boolean to mapset() Commit: https://github.com/vim/vim/commit/74273e66914e46eb5814c13a1b888e45358859b6 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Oct 1 21:37:21 2020 +0200 patch 8.2.1782: Vim9: cannot pass boolean to mapset() Problem: Vim9: cannot pass boolean to mapset(). Solution: Use get_tv_bool(). (closes https://github.com/vim/vim/issues/7041)
author Bram Moolenaar <Bram@vim.org>
date Thu, 01 Oct 2020 21:45:03 +0200
parents 9b09676b9e0e
children 6d50182e7e24
line wrap: on
line diff
--- a/src/map.c
+++ b/src/map.c
@@ -2307,7 +2307,7 @@ f_mapset(typval_T *argvars, typval_T *re
     if (which == NULL)
 	return;
     mode = get_map_mode(&which, 0);
-    is_abbr = (int)tv_get_number(&argvars[1]);
+    is_abbr = (int)tv_get_bool(&argvars[1]);
 
     if (argvars[2].v_type != VAR_DICT)
     {