Skip to content

Commit cc7af98

Browse files
authored
Repairs diff editor v2 context keys (microsoft#185972)
1 parent 6637e2b commit cc7af98

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/vs/editor/browser/widget/diffEditorWidget2/diffEditorWidget2.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,12 @@ export class DiffEditorWidget2 extends DelegatingEditor implements IDiffEditor {
8080

8181
codeEditorService.willCreateDiffEditor();
8282

83-
EditorContextKeys.inDiffEditor.bindTo(this._contextKeyService).set(true);
83+
this._contextKeyService.createKey(EditorContextKeys.inDiffEditor.key, true);
8484
this._contextKeyService.createKey('diffEditorVersion', 2);
8585

8686
this._options = new DiffEditorOptions(options);
8787

88+
this._contextKeyService.createKey(EditorContextKeys.isEmbeddedDiffEditor.key, false);
8889
const isEmbeddedDiffEditorKey = EditorContextKeys.isEmbeddedDiffEditor.bindTo(this._contextKeyService);
8990
this._register(autorun('update isEmbeddedDiffEditorKey', reader => {
9091
isEmbeddedDiffEditorKey.set(this._options.isInEmbeddedEditor.read(reader));

0 commit comments

Comments
 (0)