You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Some bubbles (viewport and list, as far as I noticed) render wrongly due to Truncate behavior which in turn is due to StringWidth.
I'm not familiar with how ansi actually works so I couldn't identify the bug; but by just doing s = Strip(s) at the top of StringWidth it behaves like before.
This appears to be introduced on lipgloss 0.11.1, specifically in x/ansi 0.1.3, specifically on this commit: fe84162 from PR #115
Setup
WSL arch linux (5.15.153.1-microsoft-standard-WSL2)
Sometimes the width is more than the screen and lines overflow to the next one
Source Code
Sorry, I don't have a minimal code to reproduce. But it can be seen in the app I'm working on: mangal@dev. After loading, hitting ctrl+l to open the "logs" the viewport will be messed up.
Expected behavior
The lines should be truncated to the correct width.
Screenshots
On lipgloss 0.11.0 (or by Striping in StringWidth):
viewport:
list:
On lipgloss 0.11.1 (or without Striping in StringWidth):
viewport:
list (some lines get shifted down and stay "burned" throughout other views):
Additional context
Also seems like it is only off by 1, if I substract -1 to maxWidth in lipgloss.Render it also behaves like before.
The text was updated successfully, but these errors were encountered:
We need to reset the grapheme state after encountering a non-printable
character or when we're not using uniseg for string width (ASCII
printables have a width of 1 cell).
Fixes: #122Fixes: #123
Fixes: charmbracelet/lipgloss#332
Describe the bug
Some bubbles (viewport and list, as far as I noticed) render wrongly due to
Truncate
behavior which in turn is due toStringWidth
.I'm not familiar with how ansi actually works so I couldn't identify the bug; but by just doing
s = Strip(s)
at the top ofStringWidth
it behaves like before.This appears to be introduced on
lipgloss
0.11.1, specifically inx/ansi
0.1.3, specifically on this commit: fe84162 from PR #115Setup
Output of
locale
:To Reproduce
Steps to reproduce the behavior:
Source Code
Sorry, I don't have a minimal code to reproduce. But it can be seen in the app I'm working on: mangal@dev. After loading, hitting
ctrl+l
to open the "logs" the viewport will be messed up.Expected behavior
The lines should be truncated to the correct width.
Screenshots
On
lipgloss
0.11.0 (or byStrip
ing inStringWidth
):viewport:
list:
On
lipgloss
0.11.1 (or withoutStrip
ing inStringWidth
):viewport:
list (some lines get shifted down and stay "burned" throughout other views):
Additional context
Also seems like it is only off by 1, if I substract
-1
tomaxWidth
inlipgloss.Render
it also behaves like before.The text was updated successfully, but these errors were encountered: