()
| 982 | } |
| 983 | |
| 984 | startOfLastLine(): Cursor { |
| 985 | // Go to the beginning of the last line |
| 986 | const lastNewlineIndex = this.text.lastIndexOf('\n') |
| 987 | |
| 988 | if (lastNewlineIndex === -1) { |
| 989 | // If there are no newlines, the text is a single line |
| 990 | return this.startOfLine() |
| 991 | } |
| 992 | |
| 993 | // Position after the last newline character |
| 994 | return new Cursor(this.measuredText, lastNewlineIndex + 1, 0) |
| 995 | } |
| 996 | |
| 997 | goToLine(lineNumber: number): Cursor { |
| 998 | // Go to the beginning of the specified logical line (1-indexed, like vim) |
no test coverage detected