MCPcopy Create free account
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}
97
98// maxTextareaHeight caps the textarea: terminal minus chrome, breathing room,
99// the active popover, and the queued-prompt box. Shared by recomputeLayout and
100// preGrowTextarea.
101func (m *Model) maxTextareaHeight() int {
102 if m.height <= 0 {
103 return 1
104 }
105 return max(1, m.height-minViewport-chromeHeight-m.popoverHeight()-m.queuedHeight())
106}

Callers 3

recomputeLayoutMethod · 0.95
preGrowTextareaMethod · 0.95

Calls 2

popoverHeightMethod · 0.95
queuedHeightMethod · 0.95

Tested by 1