Fix preview window incorrectly rendering empty line at the bottom

This commit is contained in:
Junegunn Choi 2024-08-18 11:37:50 +09:00
parent ee5302fb2d
commit 5cce17e80a
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

View File

@ -2722,10 +2722,14 @@ Loop:
break
}
if lbg >= 0 {
t.pwindow.CFill(-1, lbg, tui.AttrRegular,
fillRet = t.pwindow.CFill(-1, lbg, tui.AttrRegular,
strings.Repeat(" ", t.pwindow.Width()-t.pwindow.X())+"\n")
} else {
t.pwindow.Fill("\n")
fillRet = t.pwindow.Fill("\n")
}
if fillRet == tui.FillSuspend {
t.previewed.filled = true
break
}
}
lineNo++