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

Method GetVisibleLines

internal/app/darktile/termutil/buffer.go:627–637  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

625}
626
627func (buffer *Buffer) GetVisibleLines() []Line {
628 lines := []Line{}
629
630 for i := buffer.Height() - int(buffer.ViewHeight()); i < buffer.Height(); i++ {
631 y := i - int(buffer.scrollLinesFromBottom)
632 if y >= 0 && y < len(buffer.lines) {
633 lines = append(lines, buffer.lines[y])
634 }
635 }
636 return lines
637}
638
639// tested to here
640

Callers 15

TestNewLineFunction · 0.80
TestTabbingFunction · 0.80
TestVisibleLinesFunction · 0.80
TestClearWithoutFullViewFunction · 0.80
TestClearWithFullViewFunction · 0.80
TestCarriageReturnFunction · 0.80
TestEraseDisplayFunction · 0.80
TestEraseDisplayToCursorFunction · 0.80

Calls 2

HeightMethod · 0.95
ViewHeightMethod · 0.95

Tested by 15

TestNewLineFunction · 0.64
TestTabbingFunction · 0.64
TestVisibleLinesFunction · 0.64
TestClearWithoutFullViewFunction · 0.64
TestClearWithFullViewFunction · 0.64
TestCarriageReturnFunction · 0.64
TestEraseDisplayFunction · 0.64
TestEraseDisplayToCursorFunction · 0.64