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

Method CursorLine

internal/app/darktile/termutil/buffer.go:216–221  ·  view source on GitHub ↗

CursorLine returns cursor line (in Origin Mode it is relative to the top margin)

()

Source from the content-addressed store, hash-verified

214
215// CursorLine returns cursor line (in Origin Mode it is relative to the top margin)
216func (buffer *Buffer) CursorLine() uint16 {
217 if buffer.modes.OriginMode {
218 return buffer.CursorLineAbsolute() - uint16(buffer.topMargin)
219 }
220 return buffer.CursorLineAbsolute()
221}
222
223func (buffer *Buffer) TopMargin() uint {
224 return buffer.topMargin

Callers 12

movePositionMethod · 0.95
drawCursorMethod · 0.80
TestBufferCreationFunction · 0.80
TestSetPositionFunction · 0.80
TestMovePositionFunction · 0.80
sgrSequenceHandlerMethod · 0.80

Calls 1

CursorLineAbsoluteMethod · 0.95

Tested by 5

TestBufferCreationFunction · 0.64
TestSetPositionFunction · 0.64
TestMovePositionFunction · 0.64