forked from aniani/vim
patch 8.2.1858: Vim9: filter functions return number instead of bool
Problem: Vim9: filter functions return number instead of bool. Solution: Return v:true instead of one. (closes #7144)
This commit is contained in:
@@ -2375,7 +2375,8 @@ f_popup_filter_menu(typval_T *argvars, typval_T *rettv)
|
||||
c = TO_SPECIAL(key[1], key[2]);
|
||||
|
||||
// consume all keys until done
|
||||
rettv->vval.v_number = 1;
|
||||
rettv->v_type = VAR_BOOL;
|
||||
rettv->vval.v_number = VVAL_TRUE;
|
||||
res.v_type = VAR_NUMBER;
|
||||
|
||||
old_lnum = wp->w_cursor.lnum;
|
||||
@@ -2429,7 +2430,8 @@ f_popup_filter_yesno(typval_T *argvars, typval_T *rettv)
|
||||
c = TO_SPECIAL(key[1], key[2]);
|
||||
|
||||
// consume all keys until done
|
||||
rettv->vval.v_number = 1;
|
||||
rettv->v_type = VAR_BOOL;
|
||||
rettv->vval.v_number = VVAL_TRUE;
|
||||
|
||||
if (c == 'y' || c == 'Y')
|
||||
res.vval.v_number = 1;
|
||||
|
||||
Reference in New Issue
Block a user