Patch 8.2.1533
Problem: Vim9: error when passing getreginfo() result to setreg().
Solution: Use dict_get_bool() for "isunnamed". (closes #6784)
Files: src/evalfunc.c, src/testdir/test_vim9_func.vim
*** ../vim-8.2.1532/src/evalfunc.c 2020-08-23 17:33:43.769458067 +0200
--- src/evalfunc.c 2020-08-28 16:34:34.974819800 +0200
***************
*** 7427,7433 ****
regname = pointreg;
}
}
! else if (dict_get_number(d, (char_u *)"isunnamed"))
pointreg = regname;
}
else
--- 7427,7433 ----
regname = pointreg;
}
}
! else if (dict_get_bool(d, (char_u *)"isunnamed", -1) > 0)
pointreg = regname;
}
else
*** ../vim-8.2.1532/src/testdir/test_vim9_func.vim 2020-08-22
19:01:57.608441927 +0200
--- src/testdir/test_vim9_func.vim 2020-08-28 16:37:13.558485674 +0200
***************
*** 1419,1424 ****
--- 1419,1431 ----
setlocal ts=8
enddef
+ def Test_setreg()
+ setreg('a', ['aaa', 'bbb', 'ccc'])
+ let reginfo = getreginfo('a')
+ setreg('a', reginfo)
+ assert_equal(reginfo, getreginfo('a'))
+ enddef
+
def Fibonacci(n: number): number
if n < 2
return n
*** ../vim-8.2.1532/src/version.c 2020-08-28 16:38:07.762363597 +0200
--- src/version.c 2020-08-28 16:39:08.614222554 +0200
***************
*** 756,757 ****
--- 756,759 ----
{ /* Add new patch number below this line */
+ /**/
+ 1533,
/**/
--
Linux is just like a wigwam: no Windows, no Gates and an Apache inside.
/// 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/202008281439.07SEdxj42252461%40masaka.moolenaar.net.