Skip to content

Commit

Permalink
BreadcrumbsControl#update should know when something changed, #112630
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed Feb 5, 2021
1 parent c11bf9d commit 9ec337b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/vs/workbench/browser/parts/editor/breadcrumbsControl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,13 @@ export class BreadcrumbsControl {

// honor diff editors and such
const uri = EditorResourceAccessor.getCanonicalUri(this._editorGroup.activeEditor, { supportSideBySide: SideBySideEditor.PRIMARY });
const wasHidden = this.isHidden();

if (!uri || !this._fileService.canHandleResource(uri)) {
// cleanup and return when there is no input or when
// we cannot handle this input
this._ckBreadcrumbsPossible.set(false);
if (!this.isHidden()) {
if (!wasHidden) {
this.hide();
return true;
} else {
Expand Down Expand Up @@ -315,7 +316,7 @@ export class BreadcrumbsControl {
}
});

return true;
return wasHidden !== this.isHidden();
}

private _onFocusEvent(event: IBreadcrumbsItemEvent): void {
Expand Down

0 comments on commit 9ec337b

Please sign in to comment.