0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

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:
Bram Moolenaar
2018-03-04 18:08:14 +01:00
parent 3f54fd319f
commit f2bd8ef2b4
48 changed files with 326 additions and 1157 deletions

View File

@@ -1017,7 +1017,7 @@ do_tag(
}
}
#ifdef FEAT_AUTOCMD
#if defined(FEAT_EVAL)
/* Let the SwapExists event know what tag we are jumping to. */
vim_snprintf((char *)IObuff, IOSIZE, ":ta %s\r", name);
set_vim_var_string(VV_SWAPCOMMAND, IObuff, -1);
@@ -1028,7 +1028,7 @@ do_tag(
*/
i = jumpto_tag(matches[cur_match], forceit, type != DT_CSCOPE);
#ifdef FEAT_AUTOCMD
#if defined(FEAT_EVAL)
set_vim_var_string(VV_SWAPCOMMAND, NULL, -1);
#endif
@@ -3174,11 +3174,7 @@ jumpto_tag(
* file. Also accept a file name for which there is a matching BufReadCmd
* autocommand event (e.g., http://sys/file).
*/
if (mch_getperm(fname) < 0
#ifdef FEAT_AUTOCMD
&& !has_autocmd(EVENT_BUFREADCMD, fname, NULL)
#endif
)
if (mch_getperm(fname) < 0 && !has_autocmd(EVENT_BUFREADCMD, fname, NULL))
{
retval = NOTAGFILE;
vim_free(nofile_fname);