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.
f2bd8ef2b4
This commit is contained in:
Jan Edmund Lazo
2020-05-31 15:53:37 -04:00
parent 2298350884
commit 64a2884d4c
3 changed files with 7 additions and 3 deletions

View File

@@ -621,7 +621,7 @@ void getout(int exitval)
/* Optionally print hashtable efficiency. */
hash_debug_results();
if (get_vim_var_nr(VV_DYING) <= 1) {
if (v_dying <= 1) {
const tabpage_T *next_tp;
// Trigger BufWinLeave for all windows, but only once per buffer.
@@ -670,8 +670,9 @@ void getout(int exitval)
shada_write_file(NULL, false);
}
if (get_vim_var_nr(VV_DYING) <= 1)
apply_autocmds(EVENT_VIMLEAVE, NULL, NULL, FALSE, curbuf);
if (v_dying <= 1) {
apply_autocmds(EVENT_VIMLEAVE, NULL, NULL, false, curbuf);
}
profile_dump();