Skip to content

Commit

Permalink
Fix: use last selected choice (Melkeydev#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
limesten authored Nov 20, 2023
1 parent d93c556 commit d74dc20
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/ui/multiInput/multiInput.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
}
case "y":
if len(m.selected) == 1 {
m.choice.Update(m.choices[m.cursor].Title)
for selectedKey := range m.selected {
m.choice.Update(m.choices[selectedKey].Title)
m.cursor = selectedKey
}
return m, tea.Quit
}
}
Expand Down

0 comments on commit d74dc20

Please sign in to comment.