Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 368ea63

Browse files
author
Akos Kitta
committedSep 29, 2023
fix: make editor readonly if resource is readonly
Closes: #1501 Ref: eclipse-theia/theia#12354 Signed-off-by: Akos Kitta <[email protected]>
1 parent 28e00dd commit 368ea63

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎arduino-ide-extension/src/browser/theia/monaco/monaco-text-model-service.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ export class MonacoTextModelService extends TheiaMonacoTextModelService {
1919
const factory = this.factories
2020
.getContributions()
2121
.find(({ scheme }) => resource.uri.scheme === scheme);
22-
const readOnly = this.sketchesServiceClient.isReadOnly(resource.uri);
22+
const readOnly =
23+
Boolean(resource.isReadonly) ||
24+
this.sketchesServiceClient.isReadOnly(resource.uri);
2325
return factory
2426
? factory.createModel(resource)
2527
: new MaybeReadonlyMonacoEditorModel(

0 commit comments

Comments
 (0)
Please sign in to comment.