To: vim_dev@googlegroups.com Subject: Patch 8.2.1782 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.1782 Problem: Vim9: cannot pass boolean to mapset(). Solution: Use get_tv_bool(). (closes #7041) Files: src/map.c, src/testdir/test_vim9_func.vim *** ../vim-8.2.1781/src/map.c 2020-09-29 21:45:37.524570542 +0200 --- src/map.c 2020-10-01 21:34:54.342375638 +0200 *************** *** 2307,2313 **** if (which == NULL) return; mode = get_map_mode(&which, 0); ! is_abbr = (int)tv_get_number(&argvars[1]); if (argvars[2].v_type != VAR_DICT) { --- 2307,2313 ---- if (which == NULL) return; mode = get_map_mode(&which, 0); ! is_abbr = (int)tv_get_bool(&argvars[1]); if (argvars[2].v_type != VAR_DICT) { *** ../vim-8.2.1781/src/testdir/test_vim9_func.vim 2020-10-01 13:01:30.876933240 +0200 --- src/testdir/test_vim9_func.vim 2020-10-01 21:31:04.650949984 +0200 *************** *** 1721,1726 **** --- 1721,1734 ---- iunabbrev foo enddef + def Test_maparg_mapset() + nnoremap :echo "hit F3" + var mapsave = maparg('', 'n', false, true) + mapset('n', false, mapsave) + + nunmap + enddef + def Test_nr2char() nr2char(97, true)->assert_equal('a') enddef *** ../vim-8.2.1781/src/version.c 2020-10-01 20:03:00.769332224 +0200 --- src/version.c 2020-10-01 21:32:23.578754610 +0200 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 1782, /**/ -- How To Keep A Healthy Level Of Insanity: 2. Page yourself over the intercom. Don't disguise your voice. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///