From eef9098f37c7b3e8d1c6c3ce2c9ab232a44beaa4 Mon Sep 17 00:00:00 2001 From: Christian Stewart Date: Mon, 3 Jan 2022 13:26:19 -0800 Subject: [PATCH] fix(list): check items slice len Signed-off-by: Christian Stewart --- list/list.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/list/list.go b/list/list.go index 5f89504..dd2bb9d 100644 --- a/list/list.go +++ b/list/list.go @@ -611,7 +611,7 @@ func (m *Model) updateKeybindings() { m.KeyMap.CloseFullHelp.SetEnabled(false) default: - hasItems := m.items != nil + hasItems := len(m.items) != 0 m.KeyMap.CursorUp.SetEnabled(hasItems) m.KeyMap.CursorDown.SetEnabled(hasItems)