Skip to content

Commit 8003c14

Browse files
committed
fix offset error indicators
1 parent ce54285 commit 8003c14

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/parsers/ParsingError.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export class ParsingValidationError extends MetaBindError {
7777
return '';
7878
}
7979

80-
const spacing = ' '.repeat(this.position.from.column + offset);
80+
const spacing = ' '.repeat(this.position.from.column + offset - 1);
8181
// highlight to the end if the end is on the same line. If the end is on a different line, highlight to the end of the line.
8282
const toIndex = this.position.to.line === this.position.from.line ? this.position.to.column : lineLength;
8383
const underline = '^'.repeat(toIndex - this.position.from.column);

0 commit comments

Comments
 (0)