To: vim_dev@googlegroups.com Subject: Patch 9.0.0936 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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 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 -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///