Skip to content

Commit

Permalink
fix #125942
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed Jun 15, 2021
1 parent 3d2dea7 commit 3d522db
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/vs/editor/contrib/format/format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ export async function formatDocumentRangesWithProvider(
}

const allEdits: TextEdit[] = [];
for (let range of ranges) {
try {
try {
for (let range of ranges) {
const rawEdits = await provider.provideDocumentRangeFormattingEdits(
model,
range,
Expand All @@ -185,9 +185,9 @@ export async function formatDocumentRangesWithProvider(
if (cts.token.isCancellationRequested) {
return true;
}
} finally {
cts.dispose();
}
} finally {
cts.dispose();
}

if (allEdits.length === 0) {
Expand Down

0 comments on commit 3d522db

Please sign in to comment.