Skip to content

Commit

Permalink
fix: increment uneditable range index correctly when computing new op…
Browse files Browse the repository at this point in the history
…erations
  • Loading branch information
KaiSaba committed Dec 6, 2024
1 parent 04bfcfb commit c40f3c1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ function computeNewOperationsForLockedCode (
newOperations.push(
createNewOperation(operation, currentNewOperationRange, remainingOperationText.slice(0, uneditableIndexInText), currentNewOperationRangeIndex)
)
currentUneditableRangeIndex++
currentNewOperationRangeIndex++
remainingOperationText = remainingOperationText.slice(uneditableIndexInText + uneditableRangeValue.length)
}
Expand Down

0 comments on commit c40f3c1

Please sign in to comment.