From f85386d170892bceecb6923f68f8861a84a77b9d Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Wed, 2 Dec 2020 23:43:43 -0500 Subject: vim-patch:8.2.1907: complete_info().selected may be wrong Problem: Complete_info().selected may be wrong. Solution: Update cp_number if it was never set. (issue vim/vim#6945) https://github.com/vim/vim/commit/f9d51354de069dddc049b9e109b1932c92e5aee6 Misc changes: For variables and function parameters that use "Direction" enum values, update their type from from "int" to "Direction". It is hard to review function parameters that must accept "Direction" enum values only. --- src/nvim/testdir/test_ins_complete.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_ins_complete.vim b/src/nvim/testdir/test_ins_complete.vim index 1776968afa..6fe1d29434 100644 --- a/src/nvim/testdir/test_ins_complete.vim +++ b/src/nvim/testdir/test_ins_complete.vim @@ -324,7 +324,7 @@ func Test_completefunc_info() set completeopt=menuone set completefunc=CompleteTest call feedkeys("i\\\\=string(complete_info())\\", "tx") - call assert_equal("matched{'pum_visible': 1, 'mode': 'function', 'selected': -1, 'items': [{'word': 'matched', 'menu': '', 'user_data': '', 'info': '', 'kind': '', 'abbr': ''}]}", getline(1)) + call assert_equal("matched{'pum_visible': 1, 'mode': 'function', 'selected': 0, 'items': [{'word': 'matched', 'menu': '', 'user_data': '', 'info': '', 'kind': '', 'abbr': ''}]}", getline(1)) bwipe! set completeopt& set completefunc& -- cgit