fix(treesitter.foldexpr): check for all insert submodes

This commit is contained in:
TheLeoP 2024-04-26 08:28:22 -05:00 committed by Lewis Russell
parent 37d8e50459
commit c5b9fb2f25

View File

@ -258,7 +258,7 @@ function FoldInfo:foldupdate(bufnr, srow, erow)
self.foldupdate_range = { srow, erow }
end
if api.nvim_get_mode().mode == 'i' then
if api.nvim_get_mode().mode:match('^i') then
-- foldUpdate() is guarded in insert mode. So update folds on InsertLeave
if #(api.nvim_get_autocmds({
group = group,