diff options
author | Shougo Matsushita <Shougo.Matsu@gmail.com> | 2022-07-27 14:40:00 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-07-27 14:40:00 +0100 |
commit | 61021aa318ca4c4a6b0182ee93388b2e9b5eefba (patch) | |
tree | 6c00416860622eb8bb9805c743c54069204cc967 /src | |
parent | 34d1773bd4a1880616c5d7ef3a26f7bd69527589 (diff) |
patch 9.0.0092: plugins cannot change v:completed_itemv9.0.0092
Problem: Plugins cannot change v:completed_item.
Solution: Make v:completed_item writeable. (Shougo Matsushita,
closes #10801)
Diffstat (limited to 'src')
-rw-r--r-- | src/evalvars.c | 2 | ||||
-rw-r--r-- | src/testdir/test_ins_complete.vim | 13 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 16 insertions, 1 deletions
diff --git a/src/evalvars.c b/src/evalvars.c index 7e6bf7a92e..16dfd0d126 100644 --- a/src/evalvars.c +++ b/src/evalvars.c @@ -111,7 +111,7 @@ static struct vimvar {VV_NAME("oldfiles", VAR_LIST), &t_list_string, 0}, {VV_NAME("windowid", VAR_NUMBER), NULL, VV_RO}, {VV_NAME("progpath", VAR_STRING), NULL, VV_RO}, - {VV_NAME("completed_item", VAR_DICT), &t_dict_string, VV_RO}, + {VV_NAME("completed_item", VAR_DICT), &t_dict_string, 0}, {VV_NAME("option_new", VAR_STRING), NULL, VV_RO}, {VV_NAME("option_old", VAR_STRING), NULL, VV_RO}, {VV_NAME("option_oldlocal", VAR_STRING), NULL, VV_RO}, diff --git a/src/testdir/test_ins_complete.vim b/src/testdir/test_ins_complete.vim index 7bebc5d8a9..35c5785d3a 100644 --- a/src/testdir/test_ins_complete.vim +++ b/src/testdir/test_ins_complete.vim @@ -387,6 +387,19 @@ func Test_CompleteDone_undo() au! CompleteDone endfunc +func Test_CompleteDone_modify() + let value = { + \ 'word': '', + \ 'abbr': '', + \ 'menu': '', + \ 'info': '', + \ 'kind': '', + \ 'user_data': '', + \ } + let v:completed_item = value + call assert_equal(v:completed_item, value) +endfunc + func CompleteTest(findstart, query) if a:findstart return col('.') diff --git a/src/version.c b/src/version.c index 5adb215d10..4d97dcddaa 100644 --- a/src/version.c +++ b/src/version.c @@ -736,6 +736,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 92, +/**/ 91, /**/ 90, |