fix: only allow collapsing leaf nodes if link_tree_to_folds = true (#257)

This commit is contained in:
Steven Arcangeli 2023-06-02 08:26:31 -07:00
parent 2abd491522
commit 5c5b355f29

View file

@ -41,7 +41,7 @@ function BufData.new(bufnr)
collapse_level = 99,
}
-- cache the evaluation of managing folds
new.manage_folds = config.manage_folds(bufnr)
new.manage_folds = config.manage_folds(bufnr) and config.link_tree_to_folds
setmetatable(new, { __index = BufData })
return new
end