Skip to content

Commit

Permalink
fix: prevent edit when uneditable range and selected range intersect …
Browse files Browse the repository at this point in the history
…or touch
  • Loading branch information
KaiSaba committed Dec 3, 2024
1 parent 221a01d commit 417adf4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}

Expand Down

0 comments on commit 417adf4

Please sign in to comment.