MCPcopy Create free account
hub / github.com/MiniCodeMonkey/chief / SetSize

Method SetSize

internal/tui/log.go:99–107  ·  view source on GitHub ↗

SetSize sets the viewport dimensions. Rebuilds the line cache if width changed.

(width, height int)

Source from the content-addressed store, hash-verified

97
98// SetSize sets the viewport dimensions. Rebuilds the line cache if width changed.
99func (l *LogViewer) SetSize(width, height int) {
100 widthChanged := l.width != width
101 l.width = width
102 l.height = height
103
104 if widthChanged && width > 0 {
105 l.rebuildCache()
106 }
107}
108
109// rebuildCache re-renders all entries using the current width.
110// This is called when the terminal is resized. Syntax highlighting is NOT

Calls 1

rebuildCacheMethod · 0.95