Fix premature truncation of colored line when --preview-window wrap is set

Fix #2346
pull/2395/head
Junegunn Choi 3 years ago
parent 8fccf20892
commit 8ae94f0059
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

@ -1331,7 +1331,7 @@ func (t *Terminal) renderPreviewText(unchanged bool) {
} else {
fillRet = t.pwindow.CFill(tui.ColPreview.Fg(), tui.ColPreview.Bg(), tui.AttrRegular, str)
}
return fillRet == tui.FillContinue
return fillRet == tui.FillContinue || t.previewOpts.wrap && fillRet == tui.FillNextLine
})
t.previewer.scrollable = t.previewer.scrollable || t.pwindow.Y() == height-1 && t.pwindow.X() == t.pwindow.Width()
if fillRet == tui.FillNextLine {

Loading…
Cancel
Save