forked from aniani/vim
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]);
|
type = tv_get_string(&argvars[1]);
|
||||||
|
|
||||||
if (argvars[2].v_type != VAR_UNKNOWN)
|
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)
|
if (p_wic)
|
||||||
options |= WILD_ICASE;
|
options |= WILD_ICASE;
|
||||||
|
@@ -1509,6 +1509,13 @@ def Test_getchar()
|
|||||||
assert_equal(0, getchar(true))
|
assert_equal(0, getchar(true))
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
|
def Test_getcompletion()
|
||||||
|
set wildignore=*.vim,*~
|
||||||
|
let l = getcompletion('run', 'file', true)
|
||||||
|
assert_equal([], l)
|
||||||
|
set wildignore&
|
||||||
|
enddef
|
||||||
|
|
||||||
def Fibonacci(n: number): number
|
def Fibonacci(n: number): number
|
||||||
if n < 2
|
if n < 2
|
||||||
return n
|
return n
|
||||||
|
@@ -754,6 +754,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1604,
|
||||||
/**/
|
/**/
|
||||||
1603,
|
1603,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user