diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-05-14 18:50:44 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-14 18:50:44 -0400 |
commit | c57a85d53490fe53158a0cbd768941b732926d83 (patch) | |
tree | eea995585edb66a7522f20faaab27144ce30c271 /src/nvim/edit.c | |
parent | ba04b3d8381c1573fabbe2c78abe87b2b0dd0026 (diff) | |
parent | 520b925627604a5c3030d4e59dc2caa2f6501736 (diff) | |
download | rneovim-c57a85d53490fe53158a0cbd768941b732926d83.tar.gz rneovim-c57a85d53490fe53158a0cbd768941b732926d83.tar.bz2 rneovim-c57a85d53490fe53158a0cbd768941b732926d83.zip |
Merge pull request #14532 from janlazo/vim-8.1.1433
vim-patch:8.0.1394,8.1.1967,8.2.{23,1000,1059,2354,2419,2433,2473,2850}
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r-- | src/nvim/edit.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index 56b563cba0..1579f3ff98 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -3150,9 +3150,7 @@ static void ins_compl_clear(void) XFREE_CLEAR(compl_orig_text); compl_enter_selects = false; // clear v:completed_item - dict_T *const d = tv_dict_alloc(); - d->dv_lock = VAR_FIXED; - set_vim_var_dict(VV_COMPLETED_ITEM, d); + set_vim_var_dict(VV_COMPLETED_ITEM, tv_dict_alloc_lock(VAR_FIXED)); } /// Check that Insert completion is active. @@ -4497,9 +4495,7 @@ static void ins_compl_delete(void) // causes flicker, thus we can't do that. changed_cline_bef_curs(); // clear v:completed_item - dict_T *const d = tv_dict_alloc(); - d->dv_lock = VAR_FIXED; - set_vim_var_dict(VV_COMPLETED_ITEM, d); + set_vim_var_dict(VV_COMPLETED_ITEM, tv_dict_alloc_lock(VAR_FIXED)); } // Insert the new text being completed. @@ -4520,8 +4516,7 @@ static void ins_compl_insert(int in_compl_func) static dict_T *ins_compl_dict_alloc(compl_T *match) { // { word, abbr, menu, kind, info } - dict_T *dict = tv_dict_alloc(); - dict->dv_lock = VAR_FIXED; + dict_T *dict = tv_dict_alloc_lock(VAR_FIXED); tv_dict_add_str( dict, S_LEN("word"), (const char *)EMPTY_IF_NULL(match->cp_str)); |