MCPcopy
hub / github.com/liamg/darktile / areaScrollUp

Method areaScrollUp

internal/app/darktile/termutil/buffer.go:143–156  ·  view source on GitHub ↗
(lines uint16)

Source from the content-addressed store, hash-verified

141}
142
143func (buffer *Buffer) areaScrollUp(lines uint16) {
144
145 // NOTE: bottom is exclusive
146 top, bottom := buffer.getAreaScrollRange()
147
148 for i := top; i < bottom; i++ {
149 from := i + uint64(lines)
150 if from < bottom {
151 buffer.lines[i] = buffer.lines[from]
152 } else {
153 buffer.lines[i] = newLine()
154 }
155 }
156}
157
158func (buffer *Buffer) saveCursor() {
159 copiedAttr := buffer.cursorAttr

Callers 2

indexMethod · 0.95
csiScrollUpHandlerMethod · 0.80

Calls 2

getAreaScrollRangeMethod · 0.95
newLineFunction · 0.85

Tested by

no test coverage detected