vim-patch:8.1.1068: cannot get all the information about current completion

Problem:    Cannot get all the information about current completion.
Solution:   Add complete_info(). (Shougo, Hirohito Higashi, closes vim/vim#4106)
fd133323d4
This commit is contained in:
Shougo Matsushita
2019-03-30 21:06:23 +09:00
parent dfb7f6b349
commit 2d63b6d2c1
7 changed files with 303 additions and 17 deletions

View File

@@ -7564,6 +7564,22 @@ static void f_complete_check(typval_T *argvars, typval_T *rettv, FunPtr fptr)
RedrawingDisabled = saved;
}
// "complete_info()" function
static void f_complete_info(typval_T *argvars, typval_T *rettv, FunPtr fptr) {
tv_dict_alloc_ret(rettv);
list_T *what_list = NULL;
if (argvars[0].v_type != VAR_UNKNOWN) {
if (argvars[0].v_type != VAR_LIST) {
EMSG(_(e_listreq));
return;
}
what_list = argvars[0].vval.v_list;
}
get_complete_info(what_list, rettv->vval.v_dict);
}
/*
* "confirm(message, buttons[, default [, type]])" function
*/