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

Method rebuildCache

internal/tui/log.go:112–118  ·  view source on GitHub ↗

rebuildCache re-renders all entries using the current width. This is called when the terminal is resized. Syntax highlighting is NOT recomputed since it's width-independent and stored in highlightedCode.

()

Source from the content-addressed store, hash-verified

110// This is called when the terminal is resized. Syntax highlighting is NOT
111// recomputed since it's width-independent and stored in highlightedCode.
112func (l *LogViewer) rebuildCache() {
113 l.totalLineCount = 0
114 for i := range l.entries {
115 l.entries[i].cachedLines = l.renderEntry(l.entries[i])
116 l.totalLineCount += len(l.entries[i].cachedLines)
117 }
118}
119
120// ScrollUp scrolls up by one line.
121func (l *LogViewer) ScrollUp() {

Callers 1

SetSizeMethod · 0.95

Calls 1

renderEntryMethod · 0.95

Tested by

no test coverage detected