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 7ecce3fb97

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 {