Skip to content

Commit

Permalink
fix(table): correct bounds for column index
Browse files Browse the repository at this point in the history
  • Loading branch information
wezzle committed Oct 24, 2024
1 parent 434e7ce commit 8a140b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model/table_model.go
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ func (m *Table) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
s := max(m.SelectedCol-1, 0)
selectedCol = &s
case key.Matches(msg, tableKeys.Right):
s := min(m.SelectedCol+1, len(m.Table.Columns()))
s := min(m.SelectedCol+1, len(m.Table.Columns())-1)
selectedCol = &s
case key.Matches(msg, tableKeys.ToggleSort):
sortCol = &m.SelectedCol
Expand Down

0 comments on commit 8a140b0

Please sign in to comment.