patch 8.1.0055: complete test has wrong order of arguments v8.1.0055
authorBram Moolenaar <Bram@vim.org>
Wed, 13 Jun 2018 19:27:24 +0000 (21:27 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 13 Jun 2018 19:27:24 +0000 (21:27 +0200)
Problem:    Complete test has wrong order of arguments. Wrong type for
            sentinel variable.
Solution:   Swap arguments, use VAR_UNKNOWN. (Ozaki Kiichi)

src/mbyte.c
src/testdir/test_ins_complete.vim
src/version.c

index 545a40db0feb26b3f6d365f9a296eaa2195e1ebc..04431228805282a95e75778c820b319487669f4a 100644 (file)
@@ -4799,7 +4799,7 @@ call_imactivatefunc(int active)
 
     argv[0].v_type = VAR_NUMBER;
     argv[0].vval.v_number = active ? 1 : 0;
-    argv[1].v_type = VAR_NUMBER;
+    argv[1].v_type = VAR_UNKNOWN;
     (void)call_func_retnr(p_imaf, 1, argv, FALSE);
 }
 
index 2b4356ea3821502a07fd859d024e9734da689ca2..2cd29b5757abd3c32c5367e1090fb23be51189a3 100644 (file)
@@ -126,15 +126,15 @@ func Test_completefunc_args()
 
   set completefunc=CompleteFunc
   call feedkeys("i\<C-X>\<C-U>\<Esc>", 'x')
-  call assert_equal(s:args[0], [1, 1])
-  call assert_equal(s:args[1][0], 0)
+  call assert_equal([1, 1], s:args[0])
+  call assert_equal(0, s:args[1][0])
   set completefunc=
 
   let s:args = []
   set omnifunc=CompleteFunc
   call feedkeys("i\<C-X>\<C-O>\<Esc>", 'x')
-  call assert_equal(s:args[0], [1, 1])
-  call assert_equal(s:args[1][0], 0)
+  call assert_equal([1, 1], s:args[0])
+  call assert_equal(0, s:args[1][0])
   set omnifunc=
 
   bwipe!
index 90ec0e4141126bc32fd94ba345da5224f4561a29..8d58649031890b79b80edeea4c06b17d38ac1bf3 100644 (file)
@@ -761,6 +761,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    55,
 /**/
     54,
 /**/