Skip to content

Commit

Permalink
fix: use window context to check fold status
Browse files Browse the repository at this point in the history
Fix #151
  • Loading branch information
luukvbaal committed Jan 10, 2025
1 parent 3fd16a5 commit a2a0e3e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lua/statuscol.lua
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,13 @@ local function place_signs(win, signs)
local lnum = signs[i][2] + 1

if ss.foldclosed then
if not lines[lnum] then lines[lnum] = f.foldclosed(lnum) end
if lines[lnum] > 0 then
lnum = lines[lnum]
for j = lnum + 1, f.foldclosedend(lnum) do lines[j] = lnum end
end
a.nvim_win_call(win, function()
if not lines[lnum] then lines[lnum] = f.foldclosed(lnum) end
if lines[lnum] > 0 then
lnum = lines[lnum]
for j = lnum + 1, f.foldclosedend(lnum) do lines[j] = lnum end
end
end)
end

if not sss[lnum] then sss[lnum] = {} end
Expand Down

0 comments on commit a2a0e3e

Please sign in to comment.