()
| 445 | } |
| 446 | |
| 447 | func (ui *subModuleSelectUI) clearLines() { |
| 448 | func() { |
| 449 | height := ui.maxLines() + 1 |
| 450 | term.MoveCursorUp(height) |
| 451 | for range height { |
| 452 | term.ClearLine() |
| 453 | os.Stdout.Write(EOL) // move to the next line |
| 454 | } |
| 455 | term.ClearLine() |
| 456 | term.MoveCursorUp(height) |
| 457 | }() |
| 458 | } |
| 459 | |
| 460 | func (ui *subModuleSelectUI) maxLines() int { |
| 461 | return min(ui.termHeight-3, len(ui.subModules)) |