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

Method recomputeLayout

internal/tui/render.go:91–93  ·  view source on GitHub ↗

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.

()

Source from the content-addressed store, hash-verified

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.
92func (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,

Callers 5

updateMethod · 0.95
handleWindowSizeMethod · 0.95

Calls 3

visualPromptLinesMethod · 0.95
maxTextareaHeightMethod · 0.95
SetHeightMethod · 0.80