maxTextareaHeight caps the textarea: terminal minus chrome, breathing room, the active popover, and the queued-prompt box. Shared by recomputeLayout and preGrowTextarea.
()
| 96 | // maxTextareaHeight caps the textarea: terminal minus chrome, breathing room, |
| 97 | // the active popover, and the queued-prompt box. Shared by recomputeLayout and |
| 98 | // preGrowTextarea. |
| 99 | func (m *Model) maxTextareaHeight() int { |
| 100 | if m.height <= 0 { |
| 101 | return 1 |
| 102 | } |
| 103 | return max(1, m.height-minViewport-chromeHeight-m.popoverHeight()-m.queuedHeight()) |
| 104 | } |
| 105 | |
| 106 | // queuedBodyCap bounds the queued box body: only the first queuedBodyCap echo |