mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 18:58:12 +00:00
fix(indent): don't render scopes in closed folds. Fixes #352
This commit is contained in:
parent
c62e7a2561
commit
94ec5686a6
1 changed files with 5 additions and 0 deletions
|
@ -219,6 +219,11 @@ function M.on_win(win, buf, top, bottom)
|
|||
local state = get_state(win, buf, top, bottom)
|
||||
|
||||
local scope = scopes and scopes:get(win) --[[@as snacks.indent.Scope?]]
|
||||
vim.api.nvim_buf_call(buf, function()
|
||||
if scope and vim.fn.foldclosed(scope.from) ~= -1 then
|
||||
scope = nil
|
||||
end
|
||||
end)
|
||||
|
||||
-- adjust top and bottom if only_scope is enabled
|
||||
if config.indent.only_scope then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue