Skip to content

Commit

Permalink
Breadcrumb for "out of workspace" files is bad. Fixes #64429
Browse files Browse the repository at this point in the history
  • Loading branch information
aeschli committed Jan 11, 2019
1 parent fbbc8c5 commit ae5078f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/vs/workbench/browser/parts/editor/breadcrumbsModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,16 @@ export class EditorBreadcrumbsModel {
folder: workspaceService.getWorkspaceFolder(uri),
path: []
};

while (uri.path !== '/') {
if (info.folder && isEqual(info.folder.uri, uri)) {
break;
}
info.path.unshift(new FileElement(uri, info.path.length === 0 ? FileKind.FILE : FileKind.FOLDER));
let prevPathLength = uri.path.length;
uri = dirname(uri);
if (uri.path.length === prevPathLength) {
break;
}
}

if (info.folder && workspaceService.getWorkbenchState() === WorkbenchState.WORKSPACE) {
Expand Down

0 comments on commit ae5078f

Please sign in to comment.