Skip to content

Commit

Permalink
explorer: always show root folder and name the section "Folders"
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed Jul 7, 2017
1 parent dd2c57e commit 40606d2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/vs/workbench/parts/files/browser/views/explorerView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,7 @@ export class ExplorerView extends CollapsibleView {
}

public get name(): string {
const workspace = this.contextService.getWorkspace();
return workspace.roots.length === 1 ? workspace.name : nls.localize('folders', "Folders");
return nls.localize('folders', "Folders");
}

public set name(value) {
Expand Down Expand Up @@ -776,7 +775,7 @@ export class ExplorerView extends CollapsibleView {
// Subsequent refresh: Merge stat into our local model and refresh tree
modelStats.forEach((modelStat, index) => FileStat.mergeLocalWithDisk(modelStat, this.model.roots[index]));

const input = this.model.roots.length === 1 ? this.model.roots[0] : this.model;
const input = this.model;
if (input === this.explorerViewer.getInput()) {
return this.explorerViewer.refresh();
}
Expand All @@ -787,7 +786,6 @@ export class ExplorerView extends CollapsibleView {
const statsToExpand = expanded.length ? [this.model.roots[0]].concat(expanded) :
targetsToExpand.map(expand => this.model.findClosest(expand));

// Display roots only when there is more than 1 root
// Make sure to expand all folders that where expanded in the previous session
return this.explorerViewer.setInput(input).then(() => this.explorerViewer.expandAll(statsToExpand));
}, e => TPromise.wrapError(e));
Expand Down

0 comments on commit 40606d2

Please sign in to comment.