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

Function ExampleDocument_CurrentLineAfterCursor

document_test.go:116–128  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

114}
115
116func ExampleDocument_CurrentLineAfterCursor() {
117 d := &Document{
118 Text: `Hello! my name is c-bata.
119This is a example of Document component.
120This component has texts displayed in terminal and cursor position.
121`,
122 cursorPosition: len(`Hello! my name is c-bata.
123This is a exam`),
124 }
125 fmt.Println(d.CurrentLineAfterCursor())
126 // Output:
127 // ple of Document component.
128}
129
130func ExampleDocument_GetWordBeforeCursor() {
131 d := &Document{

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…