]> granicus.if.org Git - vim/commitdiff
patch 8.1.1325: cannot build with +eval but without +channel and +timers v8.1.1325
authorBram Moolenaar <Bram@vim.org>
Sun, 12 May 2019 11:07:14 +0000 (13:07 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 12 May 2019 11:07:14 +0000 (13:07 +0200)
Problem:    Cannot build with +eval but without +channel and +timers. (John
            Marriott)
Solution:   Adjust #ifdef for get_callback().

src/evalfunc.c
src/testdir/test_autocmd.vim
src/version.c

index b67aeb8d7f22a24b625375809ab02a15c1aa8ddb..eda18e546f22de487ca244c172d32547ab257bf6 100644 (file)
@@ -14675,7 +14675,6 @@ f_test_settime(typval_T *argvars, typval_T *rettv UNUSED)
     time_for_testing = (time_t)tv_get_number(&argvars[0]);
 }
 
-#if defined(FEAT_JOB_CHANNEL) || defined(FEAT_TIMERS) || defined(PROTO)
 /*
  * Get a callback from "arg".  It can be a Funcref or a function name.
  * When "arg" is zero return an empty string.
@@ -14716,7 +14715,6 @@ free_callback(char_u *callback, partial_T *partial)
        vim_free(callback);
     }
 }
-#endif
 
 #ifdef FEAT_TIMERS
 /*
index 48db3e2a996d8b58b4874d05cdbd7e33cf1c0567..b22718aee668ee5956fe3a7800b8438e1b5d492c 100644 (file)
@@ -18,6 +18,7 @@ func Test_vim_did_enter()
 endfunc
 
 if has('timers')
+
   func ExitInsertMode(id)
     call feedkeys("\<Esc>")
   endfunc
@@ -70,7 +71,30 @@ if has('timers')
     au! CursorHoldI
     set updatetime&
   endfunc
-endif
+
+  func Test_OptionSet_modeline()
+    call test_override('starting', 1)
+    au! OptionSet
+    augroup set_tabstop
+      au OptionSet tabstop call timer_start(1, {-> execute("echo 'Handler called'", "")})
+    augroup END
+    call writefile(['vim: set ts=7 sw=5 :', 'something'], 'XoptionsetModeline')
+    set modeline
+    let v:errmsg = ''
+    call assert_fails('split XoptionsetModeline', 'E12:')
+    call assert_equal(7, &ts)
+    call assert_equal('', v:errmsg)
+
+    augroup set_tabstop
+      au!
+    augroup END
+    bwipe!
+    set ts&
+    call delete('XoptionsetModeline')
+    call test_override('starting', 0)
+  endfunc
+
+endif "has('timers')
 
 func Test_bufunload()
   augroup test_bufunload_group
@@ -673,28 +697,6 @@ func Test_OptionSet_diffmode_close()
   "delfunc! AutoCommandOptionSet
 endfunc
 
-func Test_OptionSet_modeline()
-  call test_override('starting', 1)
-  au! OptionSet
-  augroup set_tabstop
-    au OptionSet tabstop call timer_start(1, {-> execute("echo 'Handler called'", "")})
-  augroup END
-  call writefile(['vim: set ts=7 sw=5 :', 'something'], 'XoptionsetModeline')
-  set modeline
-  let v:errmsg = ''
-  call assert_fails('split XoptionsetModeline', 'E12:')
-  call assert_equal(7, &ts)
-  call assert_equal('', v:errmsg)
-
-  augroup set_tabstop
-    au!
-  augroup END
-  bwipe!
-  set ts&
-  call delete('XoptionsetModeline')
-  call test_override('starting', 0)
-endfunc
-
 " Test for Bufleave autocommand that deletes the buffer we are about to edit.
 func Test_BufleaveWithDelete()
   new | edit Xfile1
index d489880f4458e6e8e1524af7fa82ffe2a1c7daf0..24f4bea8db9613675a7bc3f6a1948e1cd2fbe28c 100644 (file)
@@ -767,6 +767,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1325,
 /**/
     1324,
 /**/