From e6de7749b139c3ff38285437d390f5f92e1689fb Mon Sep 17 00:00:00 2001 From: Maas Lalani Date: Mon, 27 Feb 2023 19:05:50 -0500 Subject: [PATCH] fix: require choice for multiselect --- choose/choose.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/choose/choose.go b/choose/choose.go index 468dc04..2b1b113 100644 --- a/choose/choose.go +++ b/choose/choose.go @@ -132,10 +132,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { } case "enter": m.quitting = true - // If the user hasn't selected any items in a multi-select. - // Then we select the item that they have pressed enter on. If they - // have selected items, then we simply return them. - if m.numSelected < 1 { + if m.limit <= 1 && m.numSelected < 1 { m.items[m.index].selected = true } return m, tea.Quit