File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1580,10 +1580,10 @@ export class Source extends Node {
1580
1580
/** Cached line starts. */
1581
1581
private lineCache : i32 [ ] | null = null ;
1582
1582
1583
- /** Rememberd column number. */
1584
- private lineColumn : i32 = 0 ;
1583
+ /** Remembered column number. */
1584
+ private lineColumn : i32 = 1 ;
1585
1585
1586
- /** Determines the line number at the specified position. */
1586
+ /** Determines the line number at the specified position. Starts at `1`. */
1587
1587
lineAt ( pos : i32 ) : i32 {
1588
1588
assert ( pos >= 0 && pos < 0x7fffffff ) ;
1589
1589
var lineCache = this . lineCache ;
@@ -1612,7 +1612,7 @@ export class Source extends Node {
1612
1612
return assert ( 0 ) ;
1613
1613
}
1614
1614
1615
- /** Gets the column number at the last position queried with `lineAt`. */
1615
+ /** Gets the column number at the last position queried with `lineAt`. Starts at `1`. */
1616
1616
columnAt ( ) : i32 {
1617
1617
return this . lineColumn ;
1618
1618
}
Original file line number Diff line number Diff line change @@ -3627,7 +3627,7 @@ export class Function extends TypedElement {
3627
3627
range . debugInfoRef ,
3628
3628
source . debugInfoIndex ,
3629
3629
source . lineAt ( range . start ) ,
3630
- source . columnAt ( )
3630
+ source . columnAt ( ) - 1 // source maps are 0-based
3631
3631
) ;
3632
3632
}
3633
3633
}
You can’t perform that action at this time.
0 commit comments