mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 9.1.0900: Vim9: digraph_getlist() does not accept bool arg
Problem: Vim9: digraph_getlist() does not accept bool argument (Maxim Kim) Solution: accept boolean as first argument (Yegappan Lakshmanan) fixes: #16154 closes: #16159 Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
9a39483adb
commit
198ada3d9f
@@ -2115,18 +2115,15 @@ f_digraph_getlist(typval_T *argvars, typval_T *rettv)
|
||||
# ifdef FEAT_DIGRAPHS
|
||||
int flag_list_all;
|
||||
|
||||
if (in_vim9script() && check_for_opt_bool_arg(argvars, 0) == FAIL)
|
||||
if (check_for_opt_bool_arg(argvars, 0) == FAIL)
|
||||
return;
|
||||
|
||||
if (argvars[0].v_type == VAR_UNKNOWN)
|
||||
flag_list_all = FALSE;
|
||||
else
|
||||
{
|
||||
int error = FALSE;
|
||||
varnumber_T flag = tv_get_number_chk(&argvars[0], &error);
|
||||
varnumber_T flag = tv_get_bool(&argvars[0]);
|
||||
|
||||
if (error)
|
||||
return;
|
||||
flag_list_all = flag ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user