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 <F3> :echo "hit F3"<CR>
+ var mapsave = maparg('<F3>', 'n', false, true)
+ mapset('n', false, mapsave)
+
+ nunmap <F3>
+ 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 -- [email protected] -- 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 ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202010011937.091Jbn9Z1343246%40masaka.moolenaar.net.