1
1
mirror of https://github.com/walles/moar.git synced 2024-09-11 12:15:43 +03:00

Remember to set the trailer color

This commit is contained in:
Johan Walles 2022-10-28 06:51:58 +02:00
parent a30a31bb2b
commit 09e7a2178e

View File

@ -200,6 +200,12 @@ func (p *Pager) renderLine(line *Line, lineNumber int) []renderedLine {
})
}
if highlighted.Trailer != twin.StyleDefault {
// In the presence of wrapping, add the trailer to the last of the wrap
// lines only. This matches what both iTerm and the macOS Terminal does.
rendered[len(rendered)-1].trailer = highlighted.Trailer
}
return rendered
}