mirror of
https://github.com/kevinhwang91/nvim-ufo
synced 2024-09-16 14:14:02 +02:00
fix(decorator): correct capture condition
This commit is contained in:
parent
9826317200
commit
dd83ca6f8f
1 changed files with 7 additions and 3 deletions
|
@ -211,10 +211,14 @@ function Decorator:getVirtTextAndCloseFold(winid, lnum, endLnum, doRender)
|
|||
local width = wses:textWidth()
|
||||
local ok, res = true, wses.foldedTextMaps[lnum]
|
||||
local fl = fb:foldedLine(lnum)
|
||||
if not res and fl then
|
||||
res = fl.virtText
|
||||
local rendered = false
|
||||
if fl then
|
||||
if not res and not fl:widthChanged(width) then
|
||||
res = fl.virtText
|
||||
end
|
||||
rendered = fl:hasRendered()
|
||||
end
|
||||
if not res or not fl or not fl.virtText or fl:widthChanged(width) or not fl:hasRendered() then
|
||||
if not res or not rendered then
|
||||
if not endLnum then
|
||||
endLnum = wses:foldEndLnum(lnum)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue