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

Method convertViewLineToRawLine

internal/app/darktile/termutil/buffer.go:236–242  ·  view source on GitHub ↗
(viewLine uint16)

Source from the content-addressed store, hash-verified

234}
235
236func (buffer *Buffer) convertViewLineToRawLine(viewLine uint16) uint64 {
237 rawHeight := buffer.Height()
238 if int(buffer.viewHeight) > rawHeight {
239 return uint64(viewLine)
240 }
241 return uint64(int(viewLine) + (rawHeight - int(buffer.viewHeight+uint16(buffer.scrollLinesFromBottom))))
242}
243
244func (buffer *Buffer) convertRawLineToViewLine(rawLine uint64) uint16 {
245 rawHeight := buffer.Height()

Callers 12

GetVisibleSixelsMethod · 0.95
FindWordAtMethod · 0.95
SetSelectionStartMethod · 0.95
SetSelectionEndMethod · 0.95
InSelectionMethod · 0.95
getAreaScrollRangeMethod · 0.95
GetCellMethod · 0.95
insertLineMethod · 0.95
setPositionMethod · 0.95
getViewLineMethod · 0.95
eraseDisplayMethod · 0.95
eraseDisplayToCursorMethod · 0.95

Calls 1

HeightMethod · 0.95

Tested by

no test coverage detected