TextAfterCursor returns the text after the cursor.
()
| 67 | |
| 68 | // TextAfterCursor returns the text after the cursor. |
| 69 | func (d *Document) TextAfterCursor() string { |
| 70 | r := []rune(d.Text) |
| 71 | return string(r[d.cursorPosition:]) |
| 72 | } |
| 73 | |
| 74 | // GetWordBeforeCursor returns the word before the cursor. |
| 75 | // If we have whitespace before the cursor this returns an empty string. |
no outgoing calls