Open FredrikL opened 2 years ago
I'd like to tackle this issue. But I don't know how to solve it. I know the problem is at this line due to the border is resetting the previous wrapped line style
@wesleimp I'm not fully certain on the solution here either. But I think one possible route is to save some sort of state regarding the color before the border is drawn and then re-rendering that color after the border is rendered to the screen.
@maaslalani yeah, I was thinking about doing in that way. Maybe something like:
// get styles from the last line char
lastAppliedStyle := styles.GetFrom(line[len(line)])
But I don't know if there's a way to do that.
Hey, is there any update on this? I think I'm running into the same issue. I've attached two screenshots. The first line is the only one to have the correct style regardless of the line length. Any guidance would be greatly appreciated!
I ran into this same issue recently. Until it gets fixed, it seems the way to work around it is to wrap the text before styling it, instead of after.
When rendering a long string with styles applied in a "box" the text formatting is lost when lines wrap.
Attached output + example code to reproduce (uses lipgloss 0.5.0)
Output
Code to reproduce