mirror of
https://github.com/neovim/neovim.git
synced 2025-09-05 19:08:15 +00:00
fix(filetype): make recursive work...again (#22826)
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user