MCPcopy Create free account
hub / github.com/c-bata/go-prompt / OnLastLine

Method OnLastLine

document.go:428–430  ·  view source on GitHub ↗

OnLastLine returns true when we are at the last line.

()

Source from the content-addressed store, hash-verified

426
427// OnLastLine returns true when we are at the last line.
428func (d *Document) OnLastLine() bool {
429 return d.CursorPositionRow() == (d.LineCount() - 1)
430}
431
432// GetEndOfLinePosition returns relative position for the end of this line.
433func (d *Document) GetEndOfLinePosition() int {

Callers 2

TestDocument_OnLastLineFunction · 0.95
JoinNextLineMethod · 0.80

Calls 2

CursorPositionRowMethod · 0.95
LineCountMethod · 0.95

Tested by 1

TestDocument_OnLastLineFunction · 0.76