mirror of
https://github.com/charmbracelet/gum
synced 2024-06-03 06:12:19 +02:00
fix(choose): Ctrl+C should not return any items if selected
This commit is contained in:
parent
c886eb142e
commit
c17387b919
|
@ -72,6 +72,10 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||||
m.paginator.PrevPage()
|
m.paginator.PrevPage()
|
||||||
case "ctrl+c":
|
case "ctrl+c":
|
||||||
m.quitting = true
|
m.quitting = true
|
||||||
|
// Ctrl+C should unselect all items
|
||||||
|
for i := range m.items {
|
||||||
|
m.items[i].selected = false
|
||||||
|
}
|
||||||
return m, tea.Quit
|
return m, tea.Quit
|
||||||
case " ", "x":
|
case " ", "x":
|
||||||
if m.limit == 1 {
|
if m.limit == 1 {
|
||||||
|
|
Loading…
Reference in a new issue