MCPcopy
hub / github.com/c-bata/go-prompt / CurrentLineAfterCursor

Method CurrentLineAfterCursor

document.go:262–264  ·  view source on GitHub ↗

CurrentLineAfterCursor returns the text from the cursor until the end of the line.

()

Source from the content-addressed store, hash-verified

260
261// CurrentLineAfterCursor returns the text from the cursor until the end of the line.
262func (d *Document) CurrentLineAfterCursor() string {
263 return strings.Split(d.TextAfterCursor(), "\n")[0]
264}
265
266// CurrentLine return the text on the line where the cursor is. (when the input
267// consists of just one line, it equals `text`.

Calls 1

TextAfterCursorMethod · 0.95