feat(nvim): add vim.b.ufo_foldlevel_max

This commit is contained in:
Price Hiller 2024-02-24 19:27:24 -06:00
parent 8f0f1de6bc
commit 18c27d31eb
Signed by: Price
GPG Key ID: C3FADDE7A8534BEB
2 changed files with 4 additions and 0 deletions

View File

@ -0,0 +1 @@
vim.b.ufo_foldlevel_max = 1

View File

@ -19,6 +19,9 @@ local change_buf_foldlevel_by = function(num)
else
foldlevel = 0
end
if vim.b.ufo_foldlevel and foldlevel > vim.b.ufo_foldlevel_max then
return
end
set_buf_foldlevel(foldlevel)
end