()
| 154 | } |
| 155 | |
| 156 | func (s *pickerStep) clampCursor() { |
| 157 | v := s.filtered() |
| 158 | if len(v) == 0 { |
| 159 | s.cursor = 0 |
| 160 | return |
| 161 | } |
| 162 | if s.cursor >= len(v) { |
| 163 | s.cursor = len(v) - 1 |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | // toolMenuModel is the single-step tool picker. It now wraps a |
| 168 | // pickerStep so the wizard can share the underlying list rendering. |