1
0
forked from aniani/vim

patch 8.2.1614: Vim9: cannot pass "true" to searchcount()

Problem:    Vim9: cannot pass "true" to searchcount().
Solution:   Use tv_get_bool_chk(). (closes #6854)
This commit is contained in:
Bram Moolenaar
2020-09-05 21:21:16 +02:00
parent fa2e38df76
commit 597aaac9d2
3 changed files with 18 additions and 8 deletions

View File

@@ -1533,6 +1533,20 @@ def Test_nr2char()
assert_equal('a', nr2char(97, true))
enddef
def Test_searchcount()
new
setline(1, "foo bar")
:/foo
assert_equal(#{
exact_match: 1,
current: 1,
total: 1,
maxcount: 99,
incomplete: 0,
}, searchcount(#{recompute: true}))
bwipe!
enddef
def Fibonacci(n: number): number
if n < 2
return n