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