提交 1cfe71ea 编写于 作者: B Benjamin Pasero

files - mark editor as readonly also based on model knowledge

上级 90a0eb3a
......@@ -224,7 +224,9 @@ export class FileEditorInput extends TextEditorInput implements IFileEditorInput
}
isReadonly(): boolean {
return this.fileService.hasCapability(this.resource, FileSystemProviderCapabilities.Readonly);
const model = this.textFileService.models.get(this.resource);
return model?.isReadonly() || this.fileService.hasCapability(this.resource, FileSystemProviderCapabilities.Readonly);
}
isDirty(): boolean {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册