提交 5d18b2a8 编写于 作者: J Johannes Rieken

update context keys more eagerly

上级 87d3f056
...@@ -157,7 +157,6 @@ export abstract class TitleControl { ...@@ -157,7 +157,6 @@ export abstract class TitleControl {
public setContext(group: IEditorGroup): void { public setContext(group: IEditorGroup): void {
this.context = group; this.context = group;
this.resourceContext.set(group && getResource(group.activeEditor));
} }
public update(instant?: boolean): void { public update(instant?: boolean): void {
...@@ -277,6 +276,9 @@ export abstract class TitleControl { ...@@ -277,6 +276,9 @@ export abstract class TitleControl {
const {group} = identifier; const {group} = identifier;
const position = this.stacks.positionOfGroup(group); const position = this.stacks.positionOfGroup(group);
// Update the resource context
this.resourceContext.set(group && getResource(group.activeEditor));
// Editor actions require the editor control to be there, so we retrieve it via service // Editor actions require the editor control to be there, so we retrieve it via service
const control = this.editorService.getVisibleEditors()[position]; const control = this.editorService.getVisibleEditors()[position];
if (this.stacks.isActive(group) && control instanceof BaseEditor && control.input && typeof control.position === 'number') { if (this.stacks.isActive(group) && control instanceof BaseEditor && control.input && typeof control.position === 'number') {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册