Patch 8.2.1477
Problem: Vim9: error when using bufnr('%').
Solution: Don't give an error for using a string argument. (closes #6723)
Files: src/evalbuffer.c, src/testdir/test_vim9_func.vim
*** ../vim-8.2.1476/src/evalbuffer.c 2020-05-30 20:30:42.888816585 +0200
--- src/evalbuffer.c 2020-08-17 22:17:48.269502487 +0200
***************
*** 390,396 ****
buf = curbuf;
else
{
! (void)tv_get_number(&argvars[0]); // issue errmsg if type error
++emsg_off;
buf = tv_get_buf(&argvars[0], FALSE);
--emsg_off;
--- 390,397 ----
buf = curbuf;
else
{
! if (argvars[0].v_type != VAR_STRING)
! (void)tv_get_number(&argvars[0]); // issue errmsg if type error
++emsg_off;
buf = tv_get_buf(&argvars[0], FALSE);
--emsg_off;
*** ../vim-8.2.1476/src/testdir/test_vim9_func.vim 2020-08-15
16:33:24.501747305 +0200
--- src/testdir/test_vim9_func.vim 2020-08-17 22:19:23.392859758 +0200
***************
*** 1315,1320 ****
--- 1315,1325 ----
assert_equal(6, res)
enddef
+ def Test_bufnr()
+ let buf = bufnr()
+ assert_equal(buf, bufnr('%'))
+ enddef
+
def Test_getreg_return_type()
let s1: string = getreg('"')
let s2: string = getreg('"', 1)
*** ../vim-8.2.1476/src/version.c 2020-08-17 21:57:04.710167546 +0200
--- src/version.c 2020-08-17 22:20:33.300390444 +0200
***************
*** 756,757 ****
--- 756,759 ----
{ /* Add new patch number below this line */
+ /**/
+ 1477,
/**/
--
hundred-and-one symptoms of being an internet addict:
229. You spend so much time thinking what to add on this list.
/// 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/202008172022.07HKMQ4V942734%40masaka.moolenaar.net.