Skip to content

Commit 54818f3

Browse files
committed
Update rangeFormatting.ts
1 parent dfcc65a commit 54818f3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

extensions/vscode/lib/rangeFormatting.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ function getTrimmedNewText(
6262

6363
let oldTextIndex = 0;
6464
let newTextIndex = 0;
65-
let newStart = overlapStart;
66-
let newEnd = overlapEnd;
65+
let newStart = 0;
66+
let newEnd = edit.newText.length;
6767

6868
while (true) {
69-
if (oldTextIndex === overlapStart) {
69+
if (oldTextIndex <= overlapStart) {
7070
newStart = newTextIndex;
7171
}
7272
if (oldTextIndex === overlapEnd) {

0 commit comments

Comments
 (0)