From 5bf2f4b3c29fdab72044ddce74f06cb45fe9401c Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Thu, 30 Mar 2023 17:24:50 +0100 Subject: fix(filetype): make recursive work...again (#22826) --- src/nvim/autocmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/autocmd.c') 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 -- cgit