From 0b9e2a1c8a6e041aabf813e73a3876a2c667ac48 Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 6 Mar 2019 09:57:44 +0100 Subject: [PATCH] If the code editor is readonly still alow bulk edits to be applied --- src/vs/workbench/services/bulkEdit/browser/bulkEditService.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vs/workbench/services/bulkEdit/browser/bulkEditService.ts b/src/vs/workbench/services/bulkEdit/browser/bulkEditService.ts index 5137f89c2c5..f532d978e35 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 allow 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);