modalSize returns the outer width/height of the detail modal — capped so it doesn't get unreadably wide on big monitors, and clamped so small terminals still get something usable.
()
| 558 | // it doesn't get unreadably wide on big monitors, and clamped so small |
| 559 | // terminals still get something usable. |
| 560 | func (m *harness) modalSize() (int, int) { |
| 561 | w := m.width - 4 |
| 562 | if w > debugModalMaxWidth { |
| 563 | w = debugModalMaxWidth |
| 564 | } |
| 565 | if w < 30 { |
| 566 | w = 30 |
| 567 | } |
| 568 | h := m.height - 4 |
| 569 | if h > debugModalMaxHeight { |
| 570 | h = debugModalMaxHeight |
| 571 | } |
| 572 | if h < debugModalMinHeight { |
| 573 | h = debugModalMinHeight |
| 574 | } |
| 575 | return w, h |
| 576 | } |
| 577 | |
| 578 | // refreshDebugContent re-renders the debug ring into the debug viewport. |
| 579 | // Two modes: |
no outgoing calls
no test coverage detected