nextInput focuses the next input field
()
| 275 | |
| 276 | // nextInput focuses the next input field |
| 277 | func (m *model) nextInput() { |
| 278 | switch m.focused { |
| 279 | case method: |
| 280 | m.setReqMethod() |
| 281 | } |
| 282 | |
| 283 | m.blurPrompt(m.focused) |
| 284 | if m.focused+1 == fieldsCount { |
| 285 | m.focused = fieldsCount + 1 // crossed abroad, go to checkboxes |
| 286 | } else { |
| 287 | m.focused = (m.focused + 1) % end |
| 288 | } |
| 289 | m.focusPrompt(m.focused) |
| 290 | } |
| 291 | |
| 292 | // prevInput focuses the previous input field |
| 293 | func (m *model) prevInput() { |
no test coverage detected