recomputeLayout caps the textarea height so a long paste can't push the status bar off-screen: leave minViewport rows of breathing room above it. Cheap enough to run on every key press.
()
| 89 | // recomputeLayout caps the textarea height so a long paste can't push the |
| 90 | // status bar off-screen: leave minViewport rows of breathing room above it. |
| 91 | // Cheap enough to run on every key press. |
| 92 | func (m *Model) recomputeLayout() { |
| 93 | m.ta.SetHeight(max(1, min(m.visualPromptLines(), m.maxTextareaHeight()))) |
| 94 | } |
| 95 | |
| 96 | // maxTextareaHeight caps the textarea: terminal minus chrome, breathing room, |