aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/edit.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-11-19 21:32:48 -0800
committerGitHub <noreply@github.com>2019-11-19 21:32:48 -0800
commit182d3cebcf9831c0c8150be974dde3dd98251969 (patch)
tree5f81cecdae577c488642a0c465fd51fe55f14bf8 /src/nvim/edit.c
parent629ea19994d832a7de806e451941dd4904bcc5ed (diff)
parent756e2b5f65c6ffda50719f874d16c20f98027798 (diff)
downloadrneovim-182d3cebcf9831c0c8150be974dde3dd98251969.tar.gz
rneovim-182d3cebcf9831c0c8150be974dde3dd98251969.tar.bz2
rneovim-182d3cebcf9831c0c8150be974dde3dd98251969.zip
Merge #11426 from janlazo/vim-8.0.1449
vim-patch:8.0.{1449,1793}
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r--src/nvim/edit.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index 25b6502b19..cd0f3f4b9d 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -3056,7 +3056,9 @@ static void ins_compl_clear(void)
XFREE_CLEAR(compl_orig_text);
compl_enter_selects = false;
// clear v:completed_item
- set_vim_var_dict(VV_COMPLETED_ITEM, tv_dict_alloc());
+ dict_T *const d = tv_dict_alloc();
+ d->dv_lock = VAR_FIXED;
+ set_vim_var_dict(VV_COMPLETED_ITEM, d);
}
/// Check that Insert completion is active.
@@ -4313,7 +4315,9 @@ static void ins_compl_delete(void)
// causes flicker, thus we can't do that.
changed_cline_bef_curs();
// clear v:completed_item
- set_vim_var_dict(VV_COMPLETED_ITEM, tv_dict_alloc());
+ dict_T *const d = tv_dict_alloc();
+ d->dv_lock = VAR_FIXED;
+ set_vim_var_dict(VV_COMPLETED_ITEM, d);
}
// Insert the new text being completed.
@@ -4335,6 +4339,7 @@ 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;
tv_dict_add_str(
dict, S_LEN("word"),
(const char *)EMPTY_IF_NULL(match->cp_str));