diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-03-04 18:08:14 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-03-04 18:08:14 +0100 |
commit | f2bd8ef2b4507d02c6043affff8f7e85e3414d5f (patch) | |
tree | f14cb8e7ff09975920f3a813d7de4851a2972661 /src/eval.c | |
parent | 3f54fd319f6641b4bed478bcc90cdb39ede68e31 (diff) |
patch 8.0.1564: too many #ifdefsv8.0.1564
Problem: Too many #ifdefs.
Solution: Graduate the +autocmd feature. Takes away 450 #ifdefs and
increases code size of tiny Vim by only 40 Kbyte.
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/eval.c b/src/eval.c index 98288d6b03..2da56a47af 100644 --- a/src/eval.c +++ b/src/eval.c @@ -5125,11 +5125,9 @@ garbage_collect(int testing) FOR_ALL_TAB_WINDOWS(tp, wp) abort = abort || set_ref_in_item(&wp->w_winvar.di_tv, copyID, NULL, NULL); -#ifdef FEAT_AUTOCMD if (aucmd_win != NULL) abort = abort || set_ref_in_item(&aucmd_win->w_winvar.di_tv, copyID, NULL, NULL); -#endif /* tabpage-local variables */ FOR_ALL_TABPAGES(tp) @@ -6560,7 +6558,6 @@ v_throwpoint(char_u *oldval) return NULL; } -#if defined(FEAT_AUTOCMD) || defined(PROTO) /* * Set v:cmdarg. * If "eap" != NULL, use "eap" to generate the value and return the old value. @@ -6618,7 +6615,7 @@ set_cmdarg(exarg_T *eap, char_u *oldarg) if (eap->force_ff != 0) sprintf((char *)newval + STRLEN(newval), " ++ff=%s", eap->cmd + eap->force_ff); -# ifdef FEAT_MBYTE +#ifdef FEAT_MBYTE if (eap->force_enc != 0) sprintf((char *)newval + STRLEN(newval), " ++enc=%s", eap->cmd + eap->force_enc); @@ -6628,11 +6625,10 @@ set_cmdarg(exarg_T *eap, char_u *oldarg) STRCPY(newval + STRLEN(newval), " ++bad=drop"); else if (eap->bad_char != 0) sprintf((char *)newval + STRLEN(newval), " ++bad=%c", eap->bad_char); -# endif +#endif vimvars[VV_CMDARG].vv_str = newval; return oldval; } -#endif /* * Get the value of internal variable "name". |