CurrentLine return the text on the line where the cursor is. (when the input consists of just one line, it equals `text`.
()
| 266 | // CurrentLine return the text on the line where the cursor is. (when the input |
| 267 | // consists of just one line, it equals `text`. |
| 268 | func (d *Document) CurrentLine() string { |
| 269 | return d.CurrentLineBeforeCursor() + d.CurrentLineAfterCursor() |
| 270 | } |
| 271 | |
| 272 | // Array pointing to the start indexes of all the lines. |
| 273 | func (d *Document) lineStartIndexes() []int { |