Skip to content

Commit

Permalink
Horizontal scrolling fix (#182)
Browse files Browse the repository at this point in the history
* fix: set border top properly

* fix: broken overflow style
  • Loading branch information
wheelibin authored Sep 1, 2024
1 parent 46e7bdd commit 0a779ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion table/footer.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func (m Model) renderFooter(width int, includeTop bool) string {
styleFooter := m.baseStyle.Copy().Inherit(m.border.styleFooter).Width(width - borderAdjustment)

if includeTop {
styleFooter.BorderTop(true)
styleFooter = styleFooter.BorderTop(true)
}

if m.staticFooter != "" {
Expand Down
6 changes: 1 addition & 5 deletions table/overflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@ const columnKeyOverflowRight = "___overflow_r___"
const columnKeyOverflowLeft = "___overflow_l__"

func genOverflowStyle(base lipgloss.Style, width int) lipgloss.Style {
style := lipgloss.NewStyle().Width(width).Align(lipgloss.Right)

style.Inherit(base)

return style
return base.Width(width).Align(lipgloss.Right)
}

func genOverflowColumnRight(width int) Column {
Expand Down

0 comments on commit 0a779ae

Please sign in to comment.