Patch 8.2.1611
Problem:    Vim9: cannot pass "true" to nr2char().
Solution:   use tv_get_bool_chk(). (closes #6878)
Files:      src/evalfunc.c, src/testdir/test_vim9_func.vim


*** ../vim-8.2.1610/src/evalfunc.c      2020-09-05 20:16:54.330410797 +0200
--- src/evalfunc.c      2020-09-05 20:21:46.573757178 +0200
***************
*** 5874,5880 ****
        int     utf8 = 0;
  
        if (argvars[1].v_type != VAR_UNKNOWN)
!           utf8 = (int)tv_get_number_chk(&argvars[1], NULL);
        if (utf8)
            buf[utf_char2bytes((int)tv_get_number(&argvars[0]), buf)] = NUL;
        else
--- 5874,5880 ----
        int     utf8 = 0;
  
        if (argvars[1].v_type != VAR_UNKNOWN)
!           utf8 = (int)tv_get_bool_chk(&argvars[1], NULL);
        if (utf8)
            buf[utf_char2bytes((int)tv_get_number(&argvars[0]), buf)] = NUL;
        else
*** ../vim-8.2.1610/src/testdir/test_vim9_func.vim      2020-09-05 
20:16:54.330410797 +0200
--- src/testdir/test_vim9_func.vim      2020-09-05 20:20:13.913966457 +0200
***************
*** 1529,1534 ****
--- 1529,1538 ----
    assert_equal(s, list2str(l, true))
  enddef
  
+ def Test_nr2char()
+   assert_equal('a', nr2char(97, true))
+ enddef
+ 
  def Fibonacci(n: number): number
    if n < 2
      return n
*** ../vim-8.2.1610/src/version.c       2020-09-05 20:16:54.330410797 +0200
--- src/version.c       2020-09-05 20:21:20.049817250 +0200
***************
*** 756,757 ****
--- 756,759 ----
  {   /* Add new patch number below this line */
+ /**/
+     1611,
  /**/

-- 
FATHER:    You killed eight wedding guests in all!
LAUNCELOT: Er, Well ... the thing is ... I thought your son was a lady.
FATHER:    I can understand that.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// 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/202009051830.085IUAr7678772%40masaka.moolenaar.net.

Raspunde prin e-mail lui