Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/vscode.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsidor Nikolic <inikolic@microsoft.com>2019-03-06 11:56:30 +0300
committerGitHub <noreply@github.com>2019-03-06 11:56:30 +0300
commit5338ec73cb805739f4fa040f140387ccc8e1819e (patch)
tree12e5eb6b4fdc306c3c445dba42fa07bac8408f61
parent43228c493069ead7cfb7d57b2da1db20fc0acdaf (diff)
parentade4c7e86d289387a555c4b33fea6487eae9f7ab (diff)
Merge pull request #69858 from Microsoft/isidorn/allowEditsOnReadonlyEditors
fixes #68549
-rw-r--r--src/vs/workbench/services/bulkEdit/browser/bulkEditService.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vs/workbench/services/bulkEdit/browser/bulkEditService.ts b/src/vs/workbench/services/bulkEdit/browser/bulkEditService.ts
index 28142311db4..75260b013b9 100644
--- a/src/vs/workbench/services/bulkEdit/browser/bulkEditService.ts
+++ b/src/vs/workbench/services/bulkEdit/browser/bulkEditService.ts
@@ -410,6 +410,10 @@ export class BulkEditService implements IBulkEditService {
}
}
+ if (codeEditor && codeEditor.getConfiguration().readOnly) {
+ // If the code editor is readonly still alow bulk edits to be applied #68549
+ codeEditor = undefined;
+ }
const bulkEdit = new BulkEdit(codeEditor, options.progress, this._logService, this._textModelService, this._fileService, this._textFileService, this._labelService, this._configurationService);
bulkEdit.add(edits);