Patch 8.2.1590
Problem: Vim9: bufnr() doesn't take "true" argument.
Solution: use tv_get_bool_chk(). (closes #6863)
Files: src/evalbuffer.c, src/testdir/test_vim9_func.vim
*** ../vim-8.2.1589/src/evalbuffer.c 2020-09-01 23:05:57.812835372 +0200
--- src/evalbuffer.c 2020-09-04 18:20:40.230628972 +0200
***************
*** 391,397 ****
// new buffer.
if (buf == NULL
&& argvars[1].v_type != VAR_UNKNOWN
! && tv_get_number_chk(&argvars[1], &error) != 0
&& !error
&& (name = tv_get_string_chk(&argvars[0])) != NULL
&& !error)
--- 391,397 ----
// new buffer.
if (buf == NULL
&& argvars[1].v_type != VAR_UNKNOWN
! && tv_get_bool_chk(&argvars[1], &error) != 0
&& !error
&& (name = tv_get_string_chk(&argvars[0])) != NULL
&& !error)
*** ../vim-8.2.1589/src/testdir/test_vim9_func.vim 2020-09-02
22:25:31.721607983 +0200
--- src/testdir/test_vim9_func.vim 2020-09-04 18:20:18.622683201 +0200
***************
*** 1327,1332 ****
--- 1327,1336 ----
def Test_bufnr()
let buf = bufnr()
assert_equal(buf, bufnr('%'))
+
+ buf = bufnr('Xdummy', true)
+ assert_notequal(-1, buf)
+ exe 'bwipe! ' .. buf
enddef
def Test_col()
*** ../vim-8.2.1589/src/version.c 2020-09-04 18:34:06.116621660 +0200
--- src/version.c 2020-09-04 18:34:53.888503205 +0200
***************
*** 756,757 ****
--- 756,759 ----
{ /* Add new patch number below this line */
+ /**/
+ 1590,
/**/
--
ARTHUR: Be quiet!
DENNIS: --but by a two-thirds majority in the case of more--
ARTHUR: Be quiet! I order you to be quiet!
WOMAN: Order, eh -- who does he think he is?
ARTHUR: I am your king!
The Quest for the Holy Grail (Monty Python)
/// 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/202009041635.084GZvC5373805%40masaka.moolenaar.net.