comparison src/os_unix.c @ 13380:69517d67421f v8.0.1564

patch 8.0.1564: too many #ifdefs commit https://github.com/vim/vim/commit/f2bd8ef2b4507d02c6043affff8f7e85e3414d5f Author: Bram Moolenaar <Bram@vim.org> Date: Sun Mar 4 18:08:14 2018 +0100 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.
author Christian Brabandt <cb@256bit.org>
date Sun, 04 Mar 2018 18:15:08 +0100
parents 179586a64f53
children cfc2451da509
comparison
equal deleted inserted replaced
13379:0f9dd1b43244 13380:69517d67421f
443 443
444 if (wtime < 0) 444 if (wtime < 0)
445 { 445 {
446 /* no character available within 'updatetime' */ 446 /* no character available within 'updatetime' */
447 did_start_blocking = TRUE; 447 did_start_blocking = TRUE;
448 #ifdef FEAT_AUTOCMD
449 if (trigger_cursorhold() && maxlen >= 3 448 if (trigger_cursorhold() && maxlen >= 3
450 && !typebuf_changed(tb_change_cnt)) 449 && !typebuf_changed(tb_change_cnt))
451 { 450 {
452 buf[0] = K_SPECIAL; 451 buf[0] = K_SPECIAL;
453 buf[1] = KS_EXTRA; 452 buf[1] = KS_EXTRA;
454 buf[2] = (int)KE_CURSORHOLD; 453 buf[2] = (int)KE_CURSORHOLD;
455 return 3; 454 return 3;
456 } 455 }
457 #endif
458 /* 456 /*
459 * If there is no character available within 'updatetime' 457 * If there is no character available within 'updatetime'
460 * seconds flush all the swap files to disk. 458 * seconds flush all the swap files to disk.
461 * Also done when interrupted by SIGWINCH. 459 * Also done when interrupted by SIGWINCH.
462 */ 460 */
1131 #endif 1129 #endif
1132 1130
1133 /* Remember how often we have been called. */ 1131 /* Remember how often we have been called. */
1134 ++entered; 1132 ++entered;
1135 1133
1136 #ifdef FEAT_AUTOCMD
1137 /* Executing autocommands is likely to use more stack space than we have 1134 /* Executing autocommands is likely to use more stack space than we have
1138 * available in the signal stack. */ 1135 * available in the signal stack. */
1139 block_autocmds(); 1136 block_autocmds();
1140 #endif
1141 1137
1142 #ifdef FEAT_EVAL 1138 #ifdef FEAT_EVAL
1143 /* Set the v:dying variable. */ 1139 /* Set the v:dying variable. */
1144 set_vim_var_nr(VV_DYING, (long)entered); 1140 set_vim_var_nr(VV_DYING, (long)entered);
1145 #endif 1141 #endif
1142 v_dying = entered;
1146 1143
1147 #ifdef HAVE_STACK_LIMIT 1144 #ifdef HAVE_STACK_LIMIT
1148 /* Since we are now using the signal stack, need to reset the stack 1145 /* Since we are now using the signal stack, need to reset the stack
1149 * limit. Otherwise using a regexp will fail. */ 1146 * limit. Otherwise using a regexp will fail. */
1150 get_stack_limit(); 1147 get_stack_limit();