Skip to content

Commit 0a779ae

Browse files
authored
Horizontal scrolling fix (#182)
* fix: set border top properly * fix: broken overflow style
1 parent 46e7bdd commit 0a779ae

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

table/footer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func (m Model) renderFooter(width int, includeTop bool) string {
1919
styleFooter := m.baseStyle.Copy().Inherit(m.border.styleFooter).Width(width - borderAdjustment)
2020

2121
if includeTop {
22-
styleFooter.BorderTop(true)
22+
styleFooter = styleFooter.BorderTop(true)
2323
}
2424

2525
if m.staticFooter != "" {

table/overflow.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@ const columnKeyOverflowRight = "___overflow_r___"
66
const columnKeyOverflowLeft = "___overflow_l__"
77

88
func genOverflowStyle(base lipgloss.Style, width int) lipgloss.Style {
9-
style := lipgloss.NewStyle().Width(width).Align(lipgloss.Right)
10-
11-
style.Inherit(base)
12-
13-
return style
9+
return base.Width(width).Align(lipgloss.Right)
1410
}
1511

1612
func genOverflowColumnRight(width int) Column {

0 commit comments

Comments
 (0)