aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2023-03-30 17:24:50 +0100
committerGitHub <noreply@github.com>2023-03-30 17:24:50 +0100
commit5bf2f4b3c29fdab72044ddce74f06cb45fe9401c (patch)
treef840435741c786908c2ea41e0c219b7e5e4a13c0 /src
parent226a6c3eaef2a7220841d3d5e69e1baf543b3d6f (diff)
downloadrneovim-5bf2f4b3c29fdab72044ddce74f06cb45fe9401c.tar.gz
rneovim-5bf2f4b3c29fdab72044ddce74f06cb45fe9401c.tar.bz2
rneovim-5bf2f4b3c29fdab72044ddce74f06cb45fe9401c.zip
fix(filetype): make recursive work...again (#22826)
Diffstat (limited to 'src')
-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