BreadcrumbsControl#update should know when something changed, https://github.com/microsoft/vscode/issues/112630

This commit is contained in:
Johannes Rieken 2021-02-05 18:09:32 +01:00
parent c11bf9d7df
commit 9ec337bb49

View file

@ -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 {
@ -315,7 +316,7 @@ export class BreadcrumbsControl {
}
});
return true;
return wasHidden !== this.isHidden();
}
private _onFocusEvent(event: IBreadcrumbsItemEvent): void {