Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/vs/sessions/contrib/changes/browser/changesView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,14 @@ function buildTreeChildren(items: IChangesFileItem[], treeRootInfo?: IChangesTre
incompressible: true,
});
} else {
// Folder node
// Folder node. Ensure that the first level of folders under
// the root folder are not being collapsed with the root folder
// as that is a special node showing the workspace folder and
// branch information.
result.push({
element: child,
children: convertChildren(child),
incompressible: parent === resourceTree.root,
collapsible: true,
collapsed: false,
});
Expand Down Expand Up @@ -1542,6 +1546,10 @@ class ChangesTreeRenderer implements ICompressibleTreeRenderer<ChangesTreeElemen
return activeSession?.sessionType ?? '';
}));

templateDisposables.add(bindContextKey(hasGitRepositoryContextKey, contextKeyService, reader => {
return this.viewModel.activeSessionHasGitRepositoryObs.read(reader);
}));

templateDisposables.add(bindContextKey(changesVersionModeContextKey, contextKeyService, reader => {
return this.viewModel.versionModeObs.read(reader);
}));
Expand Down Expand Up @@ -1706,6 +1714,7 @@ class ChangesTreeRenderer implements ICompressibleTreeRenderer<ChangesTreeElemen
private renderFolderElement(node: IResourceNode<IChangesFileItem, undefined>, templateData: IChangesTreeTemplate): void {
templateData.label.setFile(node.uri, {
fileKind: FileKind.FOLDER,
hidePath: true,
});

// Hide file-specific decorations for folders
Expand Down
Loading