aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/autocmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/autocmd.c b/src/nvim/autocmd.c
index 2e83260a40..578542adfe 100644
--- a/src/nvim/autocmd.c
+++ b/src/nvim/autocmd.c
@@ -2778,7 +2778,7 @@ void do_filetype_autocmd(buf_T *buf, bool force)
did_filetype = true;
// Only pass true for "force" when it is true or
// used recursively, to avoid endless recurrence.
- apply_autocmds(EVENT_FILETYPE, buf->b_p_ft, buf->b_fname, force, buf);
+ apply_autocmds(EVENT_FILETYPE, buf->b_p_ft, buf->b_fname, force || ft_recursive == 1, buf);
ft_recursive--;
// Just in case the old "buf" is now invalid