Skip to content

Commit c5b49ff

Browse files
pisvlaemmleint
authored andcommitted
Amend enablement/visibility checks for dirty diff widget toolbar actions (eclipse-theia#15851)
1 parent e62c8a2 commit c5b49ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/scm/src/browser/dirty-diff/dirty-diff-widget.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,10 +345,10 @@ class DirtyDiffPeekView extends MonacoEditorPeekViewWidget {
345345
if (CommandMenu.is(item)) {
346346
const { id, label, icon } = item;
347347
const itemPath = [...menuPath, id];
348-
if (icon && item.isVisible(itemPath, contextKeyService, undefined)) {
348+
if (icon && item.isVisible(itemPath, contextKeyService, undefined, this.widget)) {
349349
// Close editor on successful contributed action.
350350
// https://github.com/microsoft/vscode/blob/1.99.3/src/vs/workbench/contrib/scm/browser/quickDiffWidget.ts#L357-L361
351-
this.addAction(id, label, icon, item.isEnabled(itemPath), () => {
351+
this.addAction(id, label, icon, item.isEnabled(itemPath, this.widget), () => {
352352
item.run(itemPath, this.widget).then(() => this.dispose());
353353
});
354354
}

0 commit comments

Comments
 (0)