MCPcopy Index your code
hub / github.com/codehamr/codehamr / maxTextareaHeight

Method maxTextareaHeight

internal/tui/render.go:98–103  ·  view source on GitHub ↗

maxTextareaHeight caps the textarea: terminal minus chrome, breathing room, the active popover, and the queued-prompt box. Shared by recomputeLayout and preGrowTextarea.

()

Source from the content-addressed store, hash-verified

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.
99func (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

Callers 3

recomputeLayoutMethod · 0.95
preGrowTextareaMethod · 0.95

Calls 2

popoverHeightMethod · 0.95
queuedHeightMethod · 0.95

Tested by 1