diff --git a/src/tools.ts b/src/tools.ts index f7a4356..ebad539 100644 --- a/src/tools.ts +++ b/src/tools.ts @@ -122,7 +122,7 @@ function lockCodeUsingDecoration ( return true } return withDecoration - ? ranges.every((uneditableRange) => !uneditableRange.containsRange(range)) + ? ranges.every((uneditableRange) => !monaco.Range.areIntersecting(uneditableRange, range)) : ranges.some((editableRange) => editableRange.containsRange(range)) }