CurrentLineAfterCursor returns the text from the cursor until the end of the line.
()
| 260 | |
| 261 | // CurrentLineAfterCursor returns the text from the cursor until the end of the line. |
| 262 | func (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`. |