@@ -118,14 +118,17 @@ export class StickyLineCandidateProvider extends Disposable {
118
118
console . log ( 'start lines : ' , childrenStartLines ) ;
119
119
console . log ( 'b1 ' , binarySearch ( childrenStartLines , range . startLineNumber , ( a : number , b : number ) => { return a - b ; } ) ) ;
120
120
console . log ( 'b2 ' , binarySearch ( childrenStartLines , range . startLineNumber + depth , ( a : number , b : number ) => { return a - b ; } ) ) ;
121
+ console . log ( 'childrenStartLines : ' , childrenStartLines ) ;
121
122
const indexLower = this . updatedIndex ( binarySearch ( childrenStartLines , range . startLineNumber , ( a : number , b : number ) => { return a - b ; } ) ) ;
122
123
const indexUpper = this . updatedIndex ( binarySearch ( childrenStartLines , range . startLineNumber + depth , ( a : number , b : number ) => { return a - b ; } ) ) ;
123
124
console . log ( 'indexLower : ' , indexLower , ' and indexUpper : ' , indexUpper ) ;
124
125
for ( let i = indexLower ; i <= indexUpper ; i ++ ) {
125
- const child = outlineModel . children [ i ] ;
126
+ console . log ( 'index i : ' , i ) ;
127
+ const child = outlineModel . children . filter ( child => { return child . range ?. startLineNumber !== child . range ?. endLineNumber ; } ) [ i ] ;
126
128
if ( child . range ) {
127
129
const childStartLine = child . range . startLineNumber ;
128
130
const childEndLine = child . range . endLineNumber ;
131
+ console . log ( 'for range : ' , child . range , ' our range : ' , range , ' we are outside the if condition' ) ;
129
132
if ( range . startLineNumber <= childEndLine + 1 && childStartLine - 1 <= range . endLineNumber && childStartLine !== lastLine ) {
130
133
lastLine = childStartLine ;
131
134
result . push ( new StickyLineCandidate ( childStartLine , childEndLine - 1 , depth + 1 ) ) ;
0 commit comments