Skip to content

Commit 52d3aae

Browse files
committed
patch 8.1.0055: complete test has wrong order of arguments
Problem: Complete test has wrong order of arguments. Wrong type for sentinel variable. Solution: Swap arguments, use VAR_UNKNOWN. (Ozaki Kiichi)
1 parent 5ecdf96 commit 52d3aae

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

src/mbyte.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4799,7 +4799,7 @@ call_imactivatefunc(int active)
47994799

48004800
argv[0].v_type = VAR_NUMBER;
48014801
argv[0].vval.v_number = active ? 1 : 0;
4802-
argv[1].v_type = VAR_NUMBER;
4802+
argv[1].v_type = VAR_UNKNOWN;
48034803
(void)call_func_retnr(p_imaf, 1, argv, FALSE);
48044804
}
48054805

src/testdir/test_ins_complete.vim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,15 +126,15 @@ func Test_completefunc_args()
126126

127127
set completefunc=CompleteFunc
128128
call feedkeys("i\<C-X>\<C-U>\<Esc>", 'x')
129-
call assert_equal(s:args[0], [1, 1])
130-
call assert_equal(s:args[1][0], 0)
129+
call assert_equal([1, 1], s:args[0])
130+
call assert_equal(0, s:args[1][0])
131131
set completefunc=
132132

133133
let s:args = []
134134
set omnifunc=CompleteFunc
135135
call feedkeys("i\<C-X>\<C-O>\<Esc>", 'x')
136-
call assert_equal(s:args[0], [1, 1])
137-
call assert_equal(s:args[1][0], 0)
136+
call assert_equal([1, 1], s:args[0])
137+
call assert_equal(0, s:args[1][0])
138138
set omnifunc=
139139

140140
bwipe!

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,8 @@ static char *(features[]) =
761761

762762
static int included_patches[] =
763763
{ /* Add new patch number below this line */
764+
/**/
765+
55,
764766
/**/
765767
54,
766768
/**/

0 commit comments

Comments
 (0)