diff options
Diffstat (limited to 'src/vs/workbench/browser/parts/editor/breadcrumbsModel.ts')
-rw-r--r-- | src/vs/workbench/browser/parts/editor/breadcrumbsModel.ts | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/vs/workbench/browser/parts/editor/breadcrumbsModel.ts b/src/vs/workbench/browser/parts/editor/breadcrumbsModel.ts index d3d8b188c83..e542f84cff4 100644 --- a/src/vs/workbench/browser/parts/editor/breadcrumbsModel.ts +++ b/src/vs/workbench/browser/parts/editor/breadcrumbsModel.ts @@ -37,7 +37,7 @@ export class OutlineElement2 { export class BreadcrumbsModel { private readonly _disposables = new DisposableStore(); - private readonly _fileInfo: FileInfo; + private _fileInfo: FileInfo; private readonly _cfgFilePath: BreadcrumbsConfig<'on' | 'off' | 'last'>; private readonly _cfgSymbolPath: BreadcrumbsConfig<'on' | 'off' | 'last'>; @@ -60,6 +60,7 @@ export class BreadcrumbsModel { this._disposables.add(this._cfgFilePath.onDidChange(_ => this._onDidUpdate.fire(this))); this._disposables.add(this._cfgSymbolPath.onDidChange(_ => this._onDidUpdate.fire(this))); + this._workspaceService.onDidChangeWorkspaceFolders(this._onDidChangeWorkspaceFolders, this, this._disposables); this._fileInfo = this._initFilePathInfo(resource); if (editor) { @@ -146,6 +147,11 @@ export class BreadcrumbsModel { return info; } + private _onDidChangeWorkspaceFolders() { + this._fileInfo = this._initFilePathInfo(this.resource); + this._onDidUpdate.fire(this); + } + private _bindToEditor(editor: IEditorPane): void { const newCts = new CancellationTokenSource(); this._currentOutline.clear(); |