Skip to content

Commit 7c346e1

Browse files
committed
make sure document outline uses the code editor service from the current (code) editor
1 parent 6770e54 commit 7c346e1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsOutline.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -403,8 +403,7 @@ class DocumentSymbolsOutlineCreator implements IOutlineCreator<IEditorPane, Docu
403403
readonly dispose: () => void;
404404

405405
constructor(
406-
@IOutlineService outlineService: IOutlineService,
407-
@IInstantiationService private readonly _instantiationService: IInstantiationService,
406+
@IOutlineService outlineService: IOutlineService
408407
) {
409408
const reg = outlineService.registerOutlineCreator(this);
410409
this.dispose = () => reg.dispose();
@@ -427,7 +426,7 @@ class DocumentSymbolsOutlineCreator implements IOutlineCreator<IEditorPane, Docu
427426
return undefined;
428427
}
429428
const firstLoadBarrier = new Barrier();
430-
const result = this._instantiationService.createInstance(DocumentSymbolsOutline, editor, target, firstLoadBarrier);
429+
const result = editor.invokeWithinContext(accessor => accessor.get(IInstantiationService).createInstance(DocumentSymbolsOutline, editor!, target, firstLoadBarrier));
431430
await firstLoadBarrier.wait();
432431
return result;
433432
}

0 commit comments

Comments
 (0)