Fix cursor movement on Windows

This commit is contained in:
Andras Schmelczer 2025-04-03 21:44:45 +01:00
commit 5328e3b0f6
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C

View file

@ -13,7 +13,7 @@ export function lineAndColumnToPosition(
line: number,
column: number
): number {
const lines = text.split("\n");
const lines = text.replace("\r", "").split("\n");
if (line >= lines.length) {
throw new Error(`Line number ${line} is out of range.`);