Patch 9.0.0936
Problem: Wrong type for "isunnamed" returned by getreginfo().
Solution: Use VAR_BOOL instead of VAR_SPECIAL. (closes #11598)
Files: src/evalfunc.c, src/testdir/test_registers.vim
*** ../vim-9.0.0935/src/evalfunc.c 2022-11-21 19:56:59.403412744 +0000
--- src/evalfunc.c 2022-11-24 11:25:34.473902125 +0000
***************
*** 8415,8421 ****
if (item != NULL)
{
! item->di_tv.v_type = VAR_SPECIAL;
item->di_tv.vval.v_number = regname == buf[0]
? VVAL_TRUE : VVAL_FALSE;
(void)dict_add(dict, item);
--- 8415,8421 ----
if (item != NULL)
{
! item->di_tv.v_type = VAR_BOOL;
item->di_tv.vval.v_number = regname == buf[0]
? VVAL_TRUE : VVAL_FALSE;
(void)dict_add(dict, item);
*** ../vim-9.0.0935/src/testdir/test_registers.vim 2022-07-26
14:44:33.625670422 +0100
--- src/testdir/test_registers.vim 2022-11-24 11:29:53.337420266 +0000
***************
*** 520,525 ****
--- 520,532 ----
nunmap <F2>
unlet g:RegInfo
+ " The type of "isunnamed" was VAR_SPECIAL but should be VAR_BOOL. Can only
+ " be noticed when using json_encod().
+ call setreg('a', 'foo')
+ let reginfo = getreginfo('a')
+ let expected = #{regcontents: ['foo'], isunnamed: v:false, regtype: 'v'}
+ call assert_equal(json_encode(expected), json_encode(reginfo))
+
bwipe!
endfunc
*** ../vim-9.0.0935/src/version.c 2022-11-24 10:58:07.663390143 +0000
--- src/version.c 2022-11-24 11:31:14.905292884 +0000
***************
*** 697,698 ****
--- 697,700 ----
{ /* Add new patch number below this line */
+ /**/
+ 936,
/**/
--
Statistics say that you can have a baby per month on average:
Just get nine women pregnant.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ 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/20221124113151.3A57F1C091A%40moolenaar.net.