diff options
author | ZyX <kp-pav@yandex.ru> | 2016-08-20 23:56:49 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-03-29 10:07:43 +0300 |
commit | 2dcfc439b2ec2be4d830826061e89860977516be (patch) | |
tree | f5f3b73e9f579ffe9388574538e50be18cd13d44 /src/nvim/edit.c | |
parent | 210342d795a13e88579d3e55ae931463d16f241d (diff) | |
download | rneovim-2dcfc439b2ec2be4d830826061e89860977516be.tar.gz rneovim-2dcfc439b2ec2be4d830826061e89860977516be.tar.bz2 rneovim-2dcfc439b2ec2be4d830826061e89860977516be.zip |
eval: Split and move dict_add_nr_str to typval.c
Function was split into tv_dict_add_nr() and tv_dict_add_str().
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r-- | src/nvim/edit.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index 53b196c61f..d1cceb435a 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -4034,16 +4034,20 @@ static void ins_compl_insert(int in_compl_func) // Set completed item. // { word, abbr, menu, kind, info } dict_T *dict = tv_dict_alloc(); - dict_add_nr_str(dict, "word", 0L, - EMPTY_IF_NULL(compl_shown_match->cp_str)); - dict_add_nr_str(dict, "abbr", 0L, - EMPTY_IF_NULL(compl_shown_match->cp_text[CPT_ABBR])); - dict_add_nr_str(dict, "menu", 0L, - EMPTY_IF_NULL(compl_shown_match->cp_text[CPT_MENU])); - dict_add_nr_str(dict, "kind", 0L, - EMPTY_IF_NULL(compl_shown_match->cp_text[CPT_KIND])); - dict_add_nr_str(dict, "info", 0L, - EMPTY_IF_NULL(compl_shown_match->cp_text[CPT_INFO])); + tv_dict_add_str(dict, S_LEN("word"), + (const char *)EMPTY_IF_NULL(compl_shown_match->cp_str)); + tv_dict_add_str( + dict, S_LEN("abbr"), + (const char *)EMPTY_IF_NULL(compl_shown_match->cp_text[CPT_ABBR])); + tv_dict_add_str( + dict, S_LEN("menu"), + (const char *)EMPTY_IF_NULL(compl_shown_match->cp_text[CPT_MENU])); + tv_dict_add_str( + dict, S_LEN("kind"), + (const char *)EMPTY_IF_NULL(compl_shown_match->cp_text[CPT_KIND])); + tv_dict_add_str( + dict, S_LEN("info"), + (const char *)EMPTY_IF_NULL(compl_shown_match->cp_text[CPT_INFO])); set_vim_var_dict(VV_COMPLETED_ITEM, dict); if (!in_compl_func) { compl_curr_match = compl_shown_match; |