patch 8.0.1564: too many #ifdefs
Problem: Too many #ifdefs.
Solution: Graduate the +autocmd feature. Takes away 450 #ifdefs and
increases code size of tiny Vim by only 40 Kbyte.
diff --git a/src/os_unix.c b/src/os_unix.c
index ac89955..45fd261 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -445,7 +445,6 @@
{
/* no character available within 'updatetime' */
did_start_blocking = TRUE;
-#ifdef FEAT_AUTOCMD
if (trigger_cursorhold() && maxlen >= 3
&& !typebuf_changed(tb_change_cnt))
{
@@ -454,7 +453,6 @@
buf[2] = (int)KE_CURSORHOLD;
return 3;
}
-#endif
/*
* If there is no character available within 'updatetime'
* seconds flush all the swap files to disk.
@@ -1133,16 +1131,15 @@
/* Remember how often we have been called. */
++entered;
-#ifdef FEAT_AUTOCMD
/* Executing autocommands is likely to use more stack space than we have
* available in the signal stack. */
block_autocmds();
-#endif
#ifdef FEAT_EVAL
/* Set the v:dying variable. */
set_vim_var_nr(VV_DYING, (long)entered);
#endif
+ v_dying = entered;
#ifdef HAVE_STACK_LIMIT
/* Since we are now using the signal stack, need to reset the stack