summaryrefslogtreecommitdiff
path: root/src/diff.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-03-04 18:08:14 +0100
committerBram Moolenaar <Bram@vim.org>2018-03-04 18:08:14 +0100
commitf2bd8ef2b4507d02c6043affff8f7e85e3414d5f (patch)
treef14cb8e7ff09975920f3a813d7de4851a2972661 /src/diff.c
parent3f54fd319f6641b4bed478bcc90cdb39ede68e31 (diff)
downloadvim-git-f2bd8ef2b4507d02c6043affff8f7e85e3414d5f.tar.gz
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/diff.c')
-rw-r--r--src/diff.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/diff.c b/src/diff.c
index 2f5b38c7b..6f3c99b9a 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -872,13 +872,9 @@ diff_file(
(diff_flags & DIFF_ICASE) ? "-i " : "",
tmp_orig, tmp_new);
append_redir(cmd, (int)len, p_srr, tmp_diff);
-#ifdef FEAT_AUTOCMD
block_autocmds(); /* Avoid ShellCmdPost stuff */
-#endif
(void)call_shell(cmd, SHELL_FILTER|SHELL_SILENT|SHELL_DOOUT);
-#ifdef FEAT_AUTOCMD
unblock_autocmds();
-#endif
vim_free(cmd);
}
}
@@ -984,13 +980,9 @@ ex_diffpatch(exarg_T *eap)
* cooked mode to allow the user to respond to prompts. */
vim_snprintf((char *)buf, buflen, "patch -o %s %s < %s",
tmp_new, tmp_orig, esc_name);
-#ifdef FEAT_AUTOCMD
block_autocmds(); /* Avoid ShellCmdPost stuff */
-#endif
(void)call_shell(buf, SHELL_FILTER | SHELL_COOKED);
-#ifdef FEAT_AUTOCMD
unblock_autocmds();
-#endif
}
#ifdef UNIX
@@ -1052,11 +1044,9 @@ ex_diffpatch(exarg_T *eap)
eap->arg = newname;
ex_file(eap);
-#ifdef FEAT_AUTOCMD
/* Do filetype detection with the new name. */
if (au_has_group((char_u *)"filetypedetect"))
do_cmdline_cmd((char_u *)":doau filetypedetect BufRead");
-#endif
}
}
}