@@ -77,7 +77,7 @@ func (m Model) renderRowColumnData(row Row, column Column, rowStyle lipgloss.Sty
77
77
78
78
// This is long and could use some refactoring in the future, but not quite sure
79
79
// how to pick it apart yet.
80
- // nolint: funlen, cyclop
80
+ // nolint: funlen, cyclop, gocognit
81
81
func (m Model ) renderRow (rowIndex int , last bool ) string {
82
82
numColumns := len (m .columns )
83
83
row := m .GetVisibleRows ()[rowIndex ]
@@ -94,35 +94,35 @@ func (m Model) renderRow(rowIndex int, last bool) string {
94
94
95
95
stylesInner , stylesLast := m .styleRows ()
96
96
97
- if m . horizontalScrollOffsetCol > 0 {
97
+ for columnIndex , column := range m . columns {
98
98
var borderStyle lipgloss.Style
99
+ var rowStyles borderStyleRow
99
100
100
101
if ! last {
101
- borderStyle = stylesInner . left . Copy ()
102
+ rowStyles = stylesInner
102
103
} else {
103
- borderStyle = stylesLast . left . Copy ()
104
+ rowStyles = stylesLast
104
105
}
105
106
106
- rendered := m .renderRowColumnData (row , genOverflowColumnLeft (1 ), rowStyle , borderStyle )
107
-
108
- totalRenderedWidth += lipgloss .Width (rendered )
107
+ if m .horizontalScrollOffsetCol > 0 && columnIndex == m .horizontalScrollFreezeColumnsCount {
108
+ var borderStyle lipgloss.Style
109
109
110
- columnStrings = append (columnStrings , rendered )
111
- }
110
+ if columnIndex == 0 {
111
+ borderStyle = rowStyles .left .Copy ()
112
+ } else {
113
+ borderStyle = rowStyles .inner .Copy ()
114
+ }
112
115
113
- for columnIndex , column := range m .columns {
114
- if columnIndex < m .horizontalScrollOffsetCol {
115
- continue
116
- }
116
+ rendered := m .renderRowColumnData (row , genOverflowColumnLeft (1 ), rowStyle , borderStyle )
117
117
118
- var borderStyle lipgloss.Style
118
+ totalRenderedWidth += lipgloss .Width ( rendered )
119
119
120
- var rowStyles borderStyleRow
120
+ columnStrings = append (columnStrings , rendered )
121
+ }
121
122
122
- if ! last {
123
- rowStyles = stylesInner
124
- } else {
125
- rowStyles = stylesLast
123
+ if columnIndex >= m .horizontalScrollFreezeColumnsCount &&
124
+ columnIndex < m .horizontalScrollOffsetCol + m .horizontalScrollFreezeColumnsCount {
125
+ continue
126
126
}
127
127
128
128
if len (columnStrings ) == 0 {
0 commit comments