mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 18:05:35 +00:00
text: fix zero-width truncated newline rune accounting
This commit fixes another rune accounting issue that only existed when shaping a solitary newline with zero width while truncating the line. Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
This commit is contained in:
@@ -484,6 +484,19 @@ func TestShapeStringRuneAccounting(t *testing.T) {
|
||||
MaxWidth: 999929,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "newline zero-width regression",
|
||||
input: "\n",
|
||||
params: Parameters{
|
||||
Font: font.Font{Typeface: "Go", Style: font.Regular, Weight: font.Normal},
|
||||
Alignment: Start,
|
||||
PxPerEm: 768,
|
||||
MaxLines: 1,
|
||||
Truncator: "\u200b",
|
||||
WrapPolicy: WrapHeuristically,
|
||||
MaxWidth: 0,
|
||||
},
|
||||
},
|
||||
} {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
for _, setup := range []setup{
|
||||
|
||||
Reference in New Issue
Block a user