@@ -79,31 +79,32 @@ describe('SegmentMarker utils', () => {
79
79
it ( 'should return a new marker offset by the given chars' , ( ) => {
80
80
const startOfLinePositions =
81
81
computeStartOfLinePositions ( '012345\n0123456789\r\n012*4567\n0123456' ) ;
82
- const marker = { line : 2 , column : 3 , position : 21 , next : undefined } ;
82
+ const marker = { line : 2 , column : 3 , position : 22 , next : undefined } ;
83
+
83
84
expect ( offsetSegment ( startOfLinePositions , marker , 1 ) )
84
- . toEqual ( { line : 2 , column : 4 , position : 22 , next : undefined } ) ;
85
+ . toEqual ( { line : 2 , column : 4 , position : 23 , next : undefined } ) ;
85
86
expect ( offsetSegment ( startOfLinePositions , marker , 2 ) )
86
- . toEqual ( { line : 2 , column : 5 , position : 23 , next : undefined } ) ;
87
+ . toEqual ( { line : 2 , column : 5 , position : 24 , next : undefined } ) ;
87
88
expect ( offsetSegment ( startOfLinePositions , marker , 4 ) )
88
- . toEqual ( { line : 2 , column : 7 , position : 25 , next : undefined } ) ;
89
+ . toEqual ( { line : 2 , column : 7 , position : 26 , next : undefined } ) ;
89
90
expect ( offsetSegment ( startOfLinePositions , marker , 6 ) )
90
- . toEqual ( { line : 3 , column : 0 , position : 27 , next : undefined } ) ;
91
+ . toEqual ( { line : 3 , column : 0 , position : 28 , next : undefined } ) ;
91
92
expect ( offsetSegment ( startOfLinePositions , marker , 8 ) )
92
- . toEqual ( { line : 3 , column : 2 , position : 29 , next : undefined } ) ;
93
+ . toEqual ( { line : 3 , column : 2 , position : 30 , next : undefined } ) ;
93
94
expect ( offsetSegment ( startOfLinePositions , marker , 20 ) )
94
- . toEqual ( { line : 3 , column : 14 , position : 41 , next : undefined } ) ;
95
+ . toEqual ( { line : 3 , column : 14 , position : 42 , next : undefined } ) ;
95
96
expect ( offsetSegment ( startOfLinePositions , marker , - 1 ) )
96
- . toEqual ( { line : 2 , column : 2 , position : 20 , next : undefined } ) ;
97
+ . toEqual ( { line : 2 , column : 2 , position : 21 , next : undefined } ) ;
97
98
expect ( offsetSegment ( startOfLinePositions , marker , - 2 ) )
98
- . toEqual ( { line : 2 , column : 1 , position : 19 , next : undefined } ) ;
99
+ . toEqual ( { line : 2 , column : 1 , position : 20 , next : undefined } ) ;
99
100
expect ( offsetSegment ( startOfLinePositions , marker , - 3 ) )
100
- . toEqual ( { line : 2 , column : 0 , position : 18 , next : undefined } ) ;
101
+ . toEqual ( { line : 2 , column : 0 , position : 19 , next : undefined } ) ;
101
102
expect ( offsetSegment ( startOfLinePositions , marker , - 4 ) )
102
- . toEqual ( { line : 1 , column : 10 , position : 17 , next : undefined } ) ;
103
+ . toEqual ( { line : 1 , column : 11 , position : 18 , next : undefined } ) ;
103
104
expect ( offsetSegment ( startOfLinePositions , marker , - 6 ) )
104
- . toEqual ( { line : 1 , column : 8 , position : 15 , next : undefined } ) ;
105
+ . toEqual ( { line : 1 , column : 9 , position : 16 , next : undefined } ) ;
105
106
expect ( offsetSegment ( startOfLinePositions , marker , - 16 ) )
106
- . toEqual ( { line : 0 , column : 5 , position : 5 , next : undefined } ) ;
107
+ . toEqual ( { line : 0 , column : 6 , position : 6 , next : undefined } ) ;
107
108
} ) ;
108
109
} ) ;
109
110
} ) ;
0 commit comments