forked from aniani/vim
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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user