Skip to content

Commit 7ecce3f

Browse files
committed
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.
1 parent 746834a commit 7ecce3f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

viewport/viewport.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,10 @@ func (m Model) View() string {
358358
extraLines = strings.Repeat("\n", max(0, m.Height-len(lines)))
359359
}
360360

361-
return m.Style.Render(strings.Join(lines, "\n") + extraLines)
361+
return m.Style.Copy().
362+
UnsetWidth().
363+
UnsetHeight().
364+
Render(strings.Join(lines, "\n") + extraLines)
362365
}
363366

364367
func clamp(v, low, high int) int {

0 commit comments

Comments
 (0)