diff --git a/help/help.go b/help/help.go index b499ac9..b6523bc 100644 --- a/help/help.go +++ b/help/help.go @@ -175,7 +175,6 @@ func (m Model) FullHelpView(groups [][]key.Binding) string { // Linter note: at this time we don't think it's worth the additional // code complexity involved in preallocating this slice. - //nolint:prealloc var ( out []string diff --git a/list/keys.go b/list/keys.go index 50bf4f2..6b7ea0d 100644 --- a/list/keys.go +++ b/list/keys.go @@ -1,4 +1,4 @@ -package list +package list //nolint:revive import "charm.land/bubbles/v2/key" diff --git a/list/list.go b/list/list.go index f5338d0..da73d0f 100644 --- a/list/list.go +++ b/list/list.go @@ -851,8 +851,6 @@ func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) { // Updates for when a user is browsing the list. func (m *Model) handleBrowsing(msg tea.Msg) tea.Cmd { - var cmds []tea.Cmd - switch msg := msg.(type) { case tea.KeyPressMsg: switch { @@ -904,11 +902,9 @@ func (m *Model) handleBrowsing(msg tea.Msg) tea.Cmd { } cmd := m.delegate.Update(msg, m) - cmds = append(cmds, cmd) - m.cursor = clamp(m.cursor, 0, m.maxCursorIndex()) - return tea.Batch(cmds...) + return cmd } // Updates for when a user is in the filter editing interface. diff --git a/table/table.go b/table/table.go index a1aa13c..39f9a40 100644 --- a/table/table.go +++ b/table/table.go @@ -403,7 +403,7 @@ func (m *Model) GotoBottom() { // default for getting all the rows and the given separator for the fields on // each row. func (m *Model) FromValues(value, separator string) { - rows := []Row{} + rows := []Row{} //nolint:prealloc for _, line := range strings.Split(value, "\n") { r := Row{} for _, field := range strings.Split(line, separator) {