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
{{ message }}
Repository navigation
Bug: Wrapping can fail in panels because effectiveWrap can be greater than panel width #628
I discovered this while adding my AddBlock into the Panels system. Take the following example:
p:=makePanel("x", "X", 20, borderFull, []PanelRow{
{
ShortLabel: "A:",
FullLabel: "Alpha: ",
Value: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since 1966, when designers at Letraset and James Mosley, the librarian at St Bride Printing Library in London, took a 1914 Cicero translation and scrambled it to make dummy text for Letraset's Body Type sheets.",
WrapWidth: 60,
},
})
This will produce output that looks like:
┌─ X ──────────────┐
│ A: Lorem Ipsum is simply dummy text of the printing and │
│ typesetting industry. Lorem Ipsum has been the industry's│
│ standard dummy text ever since 1966, when designers at│
│ Letraset and James Mosley, the librarian at St Bride│
│ Printing Library in London, took a 1914 Cicero translation│
│ and scrambled it to make dummy text for Letraset's Body│
│ Type sheets. │
└──────────────────┘
The reason is that the panels system never checks to see if effectiveWrap fits within the panel width.
Activity