diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-03-30 21:30:16 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-03-30 21:30:16 +0100 |
commit | a8783012e47e94c6037e49c0a91abc69c8cb29ff (patch) | |
tree | d39bd7ecc25f0a5fc30ee92efe92a656867f7313 /src/nvim/eval.c | |
parent | dfb7f6b3492edfd60583f76ee064ac76b1b913d8 (diff) | |
parent | 2d63b6d2c17906fafcbbfe7111202cf4c5d392af (diff) | |
download | rneovim-a8783012e47e94c6037e49c0a91abc69c8cb29ff.tar.gz rneovim-a8783012e47e94c6037e49c0a91abc69c8cb29ff.tar.bz2 rneovim-a8783012e47e94c6037e49c0a91abc69c8cb29ff.zip |
Merge #9815 'vim-patch:8.1.1068: complete_info()'
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 0961e5fd92..c324a9f1a2 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -7564,6 +7564,23 @@ 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 */ |