1
0
mirror of https://github.com/Maks1mS/bubbles.git synced 2025-04-29 09:33:43 +03:00

Ignore width/height settings in viewport's style settings

The Lip Gloss width and height settings compete with the main
width/height settings and can result in funny rendering and generally
cause confusion.
This commit is contained in:
Christian Rocha 2022-01-20 11:33:47 -05:00
parent 746834a7ce
commit 5b6142aabe

View File

@ -358,7 +358,10 @@ func (m Model) View() string {
extraLines = strings.Repeat("\n", max(0, m.Height-len(lines)))
}
return m.Style.Render(strings.Join(lines, "\n") + extraLines)
return m.Style.Copy().
UnsetWidth().
UnsetHeight().
Render(strings.Join(lines, "\n") + extraLines)
}
func clamp(v, low, high int) int {