mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.2.1619: Vim9: cannot pass "true" to spellsuggest()
Problem: Vim9: cannot pass "true" to spellsuggest(). Solution: Use tv_get_bool_chk(). (closes #6883)
This commit is contained in:
parent
401f0c0798
commit
7c27f337bf
@ -7828,7 +7828,7 @@ f_spellsuggest(typval_T *argvars UNUSED, typval_T *rettv)
|
||||
return;
|
||||
if (argvars[2].v_type != VAR_UNKNOWN)
|
||||
{
|
||||
need_capital = (int)tv_get_number_chk(&argvars[2], &typeerr);
|
||||
need_capital = (int)tv_get_bool_chk(&argvars[2], &typeerr);
|
||||
if (typeerr)
|
||||
return;
|
||||
}
|
||||
|
@ -1628,6 +1628,14 @@ def Test_setreg()
|
||||
assert_equal(reginfo, getreginfo('a'))
|
||||
enddef
|
||||
|
||||
def Test_spellsuggest()
|
||||
if !has('spell')
|
||||
MissingFeature 'spell'
|
||||
else
|
||||
spellsuggest('marrch', 1, true)->assert_equal(['March'])
|
||||
endif
|
||||
enddef
|
||||
|
||||
def Test_synID()
|
||||
new
|
||||
setline(1, "text")
|
||||
|
@ -754,6 +754,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1619,
|
||||
/**/
|
||||
1618,
|
||||
/**/
|
||||
|
Loading…
x
Reference in New Issue
Block a user