()
| 1007 | } |
| 1008 | |
| 1009 | startOfLastLine(): Cursor { |
| 1010 | // Go to the beginning of the last line |
| 1011 | const lastNewlineIndex = this.text.lastIndexOf('\n') |
| 1012 | |
| 1013 | if (lastNewlineIndex === -1) { |
| 1014 | // If there are no newlines, the text is a single line |
| 1015 | return this.startOfLine() |
| 1016 | } |
| 1017 | |
| 1018 | // Position after the last newline character |
| 1019 | return new Cursor(this.measuredText, lastNewlineIndex + 1, 0) |
| 1020 | } |
| 1021 | |
| 1022 | goToLine(lineNumber: number): Cursor { |
| 1023 | // Go to the beginning of the specified logical line (1-indexed, like vim) |
no test coverage detected