Skip to content

Commit

Permalink
SCM - set context for actions in the incoming/outgoing header (#221530)
Browse files Browse the repository at this point in the history
  • Loading branch information
lszomoru authored Jul 12, 2024
1 parent a35380d commit 776b751
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/vs/workbench/contrib/scm/browser/scmViewPane.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1240,7 +1240,8 @@ class SeparatorRenderer implements ICompressibleTreeRenderer<SCMViewSeparatorEle
return { label, toolBar, elementDisposables: new DisposableStore(), templateDisposables };
}
renderElement(element: ITreeNode<SCMViewSeparatorElement, void>, index: number, templateData: SeparatorTemplate, height: number | undefined): void {
const historyProvider = element.element.repository.provider.historyProvider.get();
const provider = element.element.repository.provider;
const historyProvider = provider.historyProvider.get();
const currentHistoryItemGroup = historyProvider?.currentHistoryItemGroup.get();

// Label
Expand All @@ -1254,6 +1255,7 @@ class SeparatorRenderer implements ICompressibleTreeRenderer<SCMViewSeparatorEle
templateData.elementDisposables.add(connectPrimaryMenu(menu, (primary, secondary) => {
templateData.toolBar.setActions(primary, secondary, [MenuId.SCMChangesSeparator]);
}));
templateData.toolBar.context = provider;
}

renderCompressedElements(node: ITreeNode<ICompressedTreeNode<SCMViewSeparatorElement>, void>, index: number, templateData: SeparatorTemplate, height: number | undefined): void {
Expand Down

0 comments on commit 776b751

Please sign in to comment.