We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 776062e commit d44e242Copy full SHA for d44e242
1 file changed
viewport/viewport.go
@@ -350,18 +350,10 @@ func (m Model) View() string {
350
return strings.Repeat("\n", max(0, m.Height-1))
351
}
352
353
- lines := m.visibleLines()
354
-
355
- // Fill empty space with newlines
356
- extraLines := ""
357
- if len(lines) < m.Height {
358
- extraLines = strings.Repeat("\n", max(0, m.Height-len(lines)))
359
- }
360
361
return m.Style.Copy().
362
- UnsetWidth().
363
- UnsetHeight().
364
- Render(strings.Join(lines, "\n") + extraLines)
+ Width(m.Width - m.Style.GetHorizontalFrameSize()).
+ Height(m.Height - m.Style.GetVerticalFrameSize()).
+ Render(strings.Join(m.visibleLines(), "\n"))
365
366
367
func clamp(v, low, high int) int {
0 commit comments