mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.1604: Vim9: cannot use "true" with getcompletion()
Problem: Vim9: cannot use "true" with getcompletion(). Solution: use tv_get_bool_chk(). (closes #6875)
This commit is contained in:
@@ -2885,7 +2885,7 @@ f_getcompletion(typval_T *argvars, typval_T *rettv)
|
||||
type = tv_get_string(&argvars[1]);
|
||||
|
||||
if (argvars[2].v_type != VAR_UNKNOWN)
|
||||
filtered = tv_get_number_chk(&argvars[2], NULL);
|
||||
filtered = tv_get_bool_chk(&argvars[2], NULL);
|
||||
|
||||
if (p_wic)
|
||||
options |= WILD_ICASE;
|
||||
|
@@ -1509,6 +1509,13 @@ def Test_getchar()
|
||||
assert_equal(0, getchar(true))
|
||||
enddef
|
||||
|
||||
def Test_getcompletion()
|
||||
set wildignore=*.vim,*~
|
||||
let l = getcompletion('run', 'file', true)
|
||||
assert_equal([], l)
|
||||
set wildignore&
|
||||
enddef
|
||||
|
||||
def Fibonacci(n: number): number
|
||||
if n < 2
|
||||
return n
|
||||
|
@@ -754,6 +754,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1604,
|
||||
/**/
|
||||
1603,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user