mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-02 06:21:50 +01:00
editors - tweak readonly usage
This commit is contained in:
@@ -545,7 +545,11 @@ export abstract class TextEditorInput extends EditorInput {
|
||||
return this.resource;
|
||||
}
|
||||
|
||||
save(groupId: GroupIdentifier, options?: ITextFileSaveOptions): Promise<boolean> {
|
||||
async save(groupId: GroupIdentifier, options?: ITextFileSaveOptions): Promise<boolean> {
|
||||
if (this.isReadonly()) {
|
||||
return false; // return early if editor is readonly
|
||||
}
|
||||
|
||||
return this.textFileService.save(this.resource, options);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user