Skip to content

Commit

Permalink
fix #65041
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed Dec 18, 2018
1 parent 0dd507a commit 4dd31e9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/vs/workbench/common/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ export class ResourceContextKey extends Disposable implements IContextKey<URI> {
this._isFileSystemResource.set(Boolean(resource && _fileService.canHandleResource(resource)));
this._isFileSystemResourceOrUntitled.set(this._isFileSystemResource.get() || this._schemeKey.get() === Schemas.untitled);
}));

this._register(_modeService.onDidCreateMode(() => {
const value = this._resourceKey.get();
this._langIdKey.set(value ? this._modeService.getModeIdByFilepathOrFirstLine(value.fsPath) : null);
}));
}

set(value: URI) {
Expand Down

0 comments on commit 4dd31e9

Please sign in to comment.