Skip to content
Open
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
5 changes: 5 additions & 0 deletions src/vs/workbench/browser/parts/editor/editorGroupView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ import { IEditorResolverService } from '../../../services/editor/common/editorRe
import { IHostService } from '../../../services/host/browser/host.js';
import { DiffEditorInput } from '../../../common/editor/diffEditorInput.js';
import { FileSystemProviderCapabilities, IFileService } from '../../../../platform/files/common/files.js';
import { IWorkspaceTrustManagementService } from '../../../../platform/workspace/common/workspaceTrust.js';

export class EditorGroupView extends Themable implements IEditorGroupView {

Expand Down Expand Up @@ -175,6 +176,7 @@ export class EditorGroupView extends Themable implements IEditorGroupView {
@IHostService private readonly hostService: IHostService,
@IDialogService private readonly dialogService: IDialogService,
@IFileService private readonly fileService: IFileService,
@IWorkspaceTrustManagementService private readonly workspaceTrustService: IWorkspaceTrustManagementService,
@ICommandService private readonly commandService: ICommandService
) {
super(themeService);
Expand Down Expand Up @@ -391,6 +393,9 @@ export class EditorGroupView extends Themable implements IEditorGroupView {
// the dirty state of this editor
this._register(this.onDidActiveEditorChange(() => observeActiveEditor()));

// Re-assert active editor context keys on trust change.
this._register(this.workspaceTrustService.onDidChangeTrust(() => observeActiveEditor()));

// Update context keys on startup
observeActiveEditor();
updateGroupContextKeys({ kind: GroupModelChangeKind.EDITOR_ACTIVE });
Expand Down