summaryrefslogtreecommitdiff
path: root/src/diff.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/diff.c')
-rw-r--r--src/diff.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/diff.c b/src/diff.c
index bc0364c77..4896c049a 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -839,7 +839,13 @@ diff_file(tmp_orig, tmp_new, tmp_diff)
(diff_flags & DIFF_ICASE) ? "-i " : "",
tmp_orig, tmp_new);
append_redir(cmd, p_srr, tmp_diff);
+#ifdef FEAT_AUTOCMD
+ ++autocmd_block; /* Avoid ShellCmdPost stuff */
+#endif
(void)call_shell(cmd, SHELL_FILTER|SHELL_SILENT|SHELL_DOOUT);
+#ifdef FEAT_AUTOCMD
+ --autocmd_block;
+#endif
vim_free(cmd);
}
}
@@ -942,7 +948,13 @@ ex_diffpatch(eap)
fullname != NULL ? fullname :
# endif
eap->arg);
+#ifdef FEAT_AUTOCMD
+ ++autocmd_block; /* Avoid ShellCmdPost stuff */
+#endif
(void)call_shell(buf, SHELL_FILTER | SHELL_COOKED);
+#ifdef FEAT_AUTOCMD
+ --autocmd_block;
+#endif
}
#ifdef UNIX