diff src/term.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 0f9dd1b43244
children 6740c499de13
line wrap: on
line diff
--- a/src/term.c
+++ b/src/term.c
@@ -1985,7 +1985,6 @@ set_termname(char_u *term)
 	    scroll_region_reset();		/* In case Rows changed */
 	check_map_keycodes();	/* check mappings for terminal codes used */
 
-#ifdef FEAT_AUTOCMD
 	{
 	    bufref_T	old_curbuf;
 
@@ -2003,7 +2002,6 @@ set_termname(char_u *term)
 	    if (bufref_valid(&old_curbuf))
 		curbuf = old_curbuf.br_buf;
 	}
-#endif
     }
 
 #ifdef FEAT_TERMRESPONSE
@@ -4515,9 +4513,7 @@ check_termcode(
 
 			LOG_TR("Received U7 status");
 			u7_status = STATUS_GOT;
-# ifdef FEAT_AUTOCMD
 			did_cursorhold = TRUE;
-# endif
 			if (col == 2)
 			    aw = "single";
 			else if (col == 3)
@@ -4560,9 +4556,7 @@ check_termcode(
 
 		    LOG_TR("Received CRV response");
 		    crv_status = STATUS_GOT;
-# ifdef FEAT_AUTOCMD
 		    did_cursorhold = TRUE;
-# endif
 
 		    /* If this code starts with CSI, you can bet that the
 		     * terminal uses 8-bit codes. */
@@ -4702,10 +4696,8 @@ check_termcode(
 # ifdef FEAT_EVAL
 		    set_vim_var_string(VV_TERMRESPONSE, tp, slen);
 # endif
-# ifdef FEAT_AUTOCMD
 		    apply_autocmds(EVENT_TERMRESPONSE,
 						   NULL, NULL, FALSE, curbuf);
-# endif
 		    key_name[0] = (int)KS_EXTRA;
 		    key_name[1] = (int)KE_IGNORE;
 		}