(selected []int, cur int)
| 475 | } |
| 476 | |
| 477 | func toggle(selected []int, cur int) []int { |
| 478 | for i, s := range selected { |
| 479 | if s == cur { |
| 480 | return append(selected[:i], selected[i+1:]...) |
| 481 | } |
| 482 | } |
| 483 | return append(selected, cur) |
| 484 | } |
| 485 | |
| 486 | func (s *Shell) multiChoice(options []string, text string, init []int, multiResults bool) []int { |
| 487 | s.multiChoiceActive = true |