fix(ui): check folds of the statuscolumn win instead of current win

This commit is contained in:
Folke Lemaitre 2023-10-03 15:53:11 +02:00
parent 6428fc167c
commit 13e9f6e6b5
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -47,9 +47,11 @@ function M.statuscolumn()
end
end
if vim.fn.foldclosed(vim.v.lnum) >= 0 then
fold = { text = vim.opt.fillchars:get().foldclose or "", texthl = "Folded" }
end
vim.api.nvim_win_call(win, function()
if vim.fn.foldclosed(vim.v.lnum) >= 0 then
fold = { text = vim.opt.fillchars:get().foldclose or "", texthl = "Folded" }
end
end)
local nu = ""
if vim.wo[win].number and vim.v.virtnum == 0 then