Various improvements #169

Merged
schmelczer merged 78 commits from asch/saturday into main 2025-11-30 15:24:52 +00:00
Showing only changes of commit 67cdc18a11 - Show all commits
Andras Schmelczer 2025-11-22 20:03:09 +00:00

View file

@ -16,11 +16,8 @@ export function positionToLineAndColumn(
text = text.replaceAll("\r", ""); text = text.replaceAll("\r", "");
if ( if (position > text.length) {
position > // position == text.length accounts for the cursor being after last character
text.length + 1
// +1 to account for the cursor being after last character
) {
throw new Error( throw new Error(
`Position ${position} exceeds text length ${text.length}` `Position ${position} exceeds text length ${text.length}`
); );