File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/vs/editor/contrib/stickyScroll/browser Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import { RunOnceScheduler } from 'vs/base/common/async';
13
13
import { Range } from 'vs/editor/common/core/range' ;
14
14
import { Emitter } from 'vs/base/common/event' ;
15
15
import { binarySearch } from 'vs/base/common/arrays' ;
16
+ import { Iterable } from 'vs/base/common/iterator' ;
16
17
17
18
export class StickyRange {
18
19
constructor (
@@ -112,7 +113,7 @@ export class StickyLineCandidateProvider extends Disposable {
112
113
return ;
113
114
}
114
115
// When several possible outline providers
115
- if ( outlineModel . children . size !== 0 && outlineModel . children . values ( ) . next ( ) . value instanceof OutlineGroup ) {
116
+ if ( outlineModel . children . size !== 0 && Iterable . first ( outlineModel . children ) instanceof OutlineGroup ) {
116
117
if ( outlineModel . children . has ( this . _providerString ) ) {
117
118
outlineModel = outlineModel . children . get ( this . _providerString ) as unknown as OutlineModel ;
118
119
} else {
@@ -129,7 +130,7 @@ export class StickyLineCandidateProvider extends Disposable {
129
130
outlineModel = outlineModel . children . get ( this . _providerString ) as unknown as OutlineModel ;
130
131
}
131
132
}
132
- this . _outlineModel = StickyOutlineElement . fromOutlineModel ( outlineModel ) ;
133
+ this . _outlineModel = StickyOutlineElement . fromOutlineModel ( outlineModel , - 1 ) ;
133
134
this . _modelVersionId = modelVersionId ;
134
135
}
135
136
}
You can’t perform that action at this time.
0 commit comments