Patch 8.2.1576
Problem:    Vim9: index() does not take "true" as argument.
Solution:   Use tv_get_bool_chk(). (closes #6823)
Files:      src/evalfunc.c, src/testdir/test_vim9_func.vim


*** ../vim-8.2.1575/src/evalfunc.c      2020-09-02 21:45:50.404307575 +0200
--- src/evalfunc.c      2020-09-02 22:08:57.764437574 +0200
***************
*** 4944,4950 ****
            item = list_find(l, (long)tv_get_number_chk(&argvars[2], &error));
            idx = l->lv_u.mat.lv_idx;
            if (argvars[3].v_type != VAR_UNKNOWN)
!               ic = (int)tv_get_number_chk(&argvars[3], &error);
            if (error)
                item = NULL;
        }
--- 4944,4950 ----
            item = list_find(l, (long)tv_get_number_chk(&argvars[2], &error));
            idx = l->lv_u.mat.lv_idx;
            if (argvars[3].v_type != VAR_UNKNOWN)
!               ic = (int)tv_get_bool_chk(&argvars[3], &error);
            if (error)
                item = NULL;
        }
*** ../vim-8.2.1575/src/testdir/test_vim9_func.vim      2020-09-02 
21:57:04.026422363 +0200
--- src/testdir/test_vim9_func.vim      2020-09-02 22:05:50.448965431 +0200
***************
*** 1497,1502 ****
--- 1497,1506 ----
    assert_equal(0, count('ABC ABC ABC', 'b', false))
  enddef
  
+ def Test_index()
+   assert_equal(3, index(['a', 'b', 'a', 'B'], 'b', 2, true))
+ enddef
+ 
  def Test_expand()
    split SomeFile
    assert_equal(['SomeFile'], expand('%', true, true))
*** ../vim-8.2.1575/src/version.c       2020-09-02 21:57:04.026422363 +0200
--- src/version.c       2020-09-02 22:09:59.572262773 +0200
***************
*** 756,757 ****
--- 756,759 ----
  {   /* Add new patch number below this line */
+ /**/
+     1576,
  /**/

-- 
GUARD #2:  Wait a minute -- supposing two swallows carried it together?
GUARD #1:  No, they'd have to have it on a line.
GUARD #2:  Well, simple!  They'd just use a standard creeper!
GUARD #1:  What, held under the dorsal guiding feathers?
GUARD #2:  Well, why not?
                                  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/202009022011.082KB5Hg3691709%40masaka.moolenaar.net.

Raspunde prin e-mail lui