From 855f7816291eae98d2a0e1e70fa08754d4b4e2e2 Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Tue, 11 Jan 2022 11:59:54 -0500 Subject: [PATCH] Update keybindings after calling InsertItem on the list model Specifically, if the list was emtpy prior to inserting an item the up/down keybindings would be hidden and disabled. --- list/list.go | 1 + 1 file changed, 1 insertion(+) diff --git a/list/list.go b/list/list.go index 19e61d7e..266e7f35 100644 --- a/list/list.go +++ b/list/list.go @@ -340,6 +340,7 @@ func (m *Model) InsertItem(index int, item Item) tea.Cmd { } m.updatePagination() + m.updateKeybindings() return cmd }