viewportSize returns the inner content dimensions of the YAML viewport.
()
| 407 | |
| 408 | // viewportSize returns the inner content dimensions of the YAML viewport. |
| 409 | func (m *agentPickerModel) viewportSize() (w, h int) { |
| 410 | dw, dh := m.detailsDialogSize() |
| 411 | return max(dw-detailsChromeCols, 1), max(dh-detailsChromeRows, 1) |
| 412 | } |
| 413 | |
| 414 | // resizeDetails keeps the viewport and its scrollbar sized to the current |
| 415 | // dialog dimensions. |
no test coverage detected