fix(statuscolumn): better way of determining open folds. Closes #1445

This commit is contained in:
Folke Lemaitre 2025-02-26 14:09:01 +01:00
parent fa29c6c926
commit 1239fb84bc
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -144,7 +144,7 @@ function M.line_signs(win, buf, lnum)
vim.api.nvim_win_call(win, function()
if vim.fn.foldclosed(lnum) >= 0 then
signs[#signs + 1] = { text = vim.opt.fillchars:get().foldclose or "", texthl = "Folded", type = "fold" }
elseif config.folds.open and tostring(vim.treesitter.foldexpr(vim.v.lnum)):sub(1, 1) == ">" then
elseif config.folds.open and vim.fn.foldlevel(lnum) > vim.fn.foldlevel(lnum - 1) then
signs[#signs + 1] = { text = vim.opt.fillchars:get().foldopen or "", type = "fold" }
end
end)