Mercurial > vim
diff src/memline.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 | ac42c4b11dbc |
children | cec5137d5332 |
line wrap: on
line diff
--- a/src/memline.c +++ b/src/memline.c @@ -1732,13 +1732,11 @@ theend: } if (serious_error && called_from_main) ml_close(curbuf, TRUE); -#ifdef FEAT_AUTOCMD else { apply_autocmds(EVENT_BUFREADPOST, NULL, curbuf->b_fname, FALSE, curbuf); apply_autocmds(EVENT_BUFWINENTER, NULL, curbuf->b_fname, FALSE, curbuf); } -#endif return; } @@ -4071,7 +4069,7 @@ attention_message( --no_wait_return; } -#ifdef FEAT_AUTOCMD +#if defined(FEAT_EVAL) static int do_swapexists(buf_T *buf, char_u *fname); /* @@ -4450,7 +4448,7 @@ findswapname( #if (defined(UNIX) || defined(VMS)) && (defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)) process_still_running = FALSE; #endif -#ifdef FEAT_AUTOCMD +#if defined(FEAT_EVAL) /* * If there is an SwapExists autocommand and we can handle * the response, trigger it. It may return 0 to ask the