Skip to content

Commit 4c714ed

Browse files
committed
docs: re-add missing comment in lockCodeUsingDecoration and fix README extractRangesFromTokens description
1 parent 24a86fd commit 4c714ed

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ It also includes some tools allowing to add some missing features to monaco-edit
1212
- `lockCodeWithDecoration` allows to make read-only code parts within a specific decoration
1313
- `lockCodeWithoutDecoration` allows to make read-only code parts outside of a specific decoration
1414
- `updateEditorKeybindingsMode` allows to apply vim or emacs keybindings
15-
- `extractRangesFromTokens` allows to extract a code section between 2 tokens
15+
- `extractRangesFromTokens` allows to extract the code sections between a start token and an end token
1616

1717
### Installation
1818

src/tools.ts

+1
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ function lockCodeUsingDecoration (
128128

129129
const originalTrigger = editor.trigger
130130
editor.trigger = function (source, handlerId, payload) {
131+
// Try to transform whole file pasting into a paste in the editable area only
131132
const ranges = getRangesFromDecorations(editor, decorationFilter)
132133
const lastEditableRange =
133134
ranges.length > 0 ? ranges[ranges.length - 1] : undefined

0 commit comments

Comments
 (0)