mirror of https://github.com/neovim/neovim.git
fix(treesitter.foldexpr): check for all insert submodes
This commit is contained in:
parent
37d8e50459
commit
c5b9fb2f25
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue