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
I have a var wrapper lipgloss.Style, I copy it, set its width to its old width minus some constant, and render that text.
I expect it to always split on whitespace (when possible), but I am occasionally finding weirdness such as the following:
I use a Moonlander at home and I don't ever use the red thumb button or the bottom
one because of how uncomfortable it is (and having rewritten this now, I'm
considering swapping the top right thumb button - return - and the middle left thu
mb
button - backspace - because i use backspace so much more).
(NB trailing spaces have been left in for accuracy)
The split between "I'm" and "considering" is totally reasonable, but what I don't understand is the split between "thu" and "mb" and newline after "mb". Since "...and the middle left thumb" is too long for the width (which is correct), I would instead expect
I use a Moonlander at home and I don't ever use the red thumb button or the bottom
one because of how uncomfortable it is (and having rewritten this now, I'm
considering swapping the top right thumb button - return - and the middle left
thumb button - backspace - because i use backspace so much more).
And to be clear, Lipgloss often is splitting on the whitespace, but just rarely (about 1 in 15 cases for me) it splits in the middle of a word.
Any thoughts why? Am I missing a setting?
Additional info (will be updated if more is brought up):
Lipgloss version: v0.8.0 (though I was finding the same thing on older version)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm just trying to use Lipgloss to limit my text's width like so:
I have a
var wrapper lipgloss.Style
, I copy it, set its width to its old width minus some constant, and render that text.I expect it to always split on whitespace (when possible), but I am occasionally finding weirdness such as the following:
(NB trailing spaces have been left in for accuracy)
The split between "I'm" and "considering" is totally reasonable, but what I don't understand is the split between "thu" and "mb" and newline after "mb". Since "...and the middle left thumb" is too long for the width (which is correct), I would instead expect
And to be clear, Lipgloss often is splitting on the whitespace, but just rarely (about 1 in 15 cases for me) it splits in the middle of a word.
Any thoughts why? Am I missing a setting?
Additional info (will be updated if more is brought up):
go1.21.0 linux/amd64
Beta Was this translation helpful? Give feedback.
All reactions