Skip to content

Commit

Permalink
Skip formatting when during format-on-save, the configured formatter …
Browse files Browse the repository at this point in the history
…cannot be found (continue to show silent notification), #106376
  • Loading branch information
jrieken committed Sep 14, 2020
1 parent cca20eb commit d3e19e4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/vs/editor/contrib/format/format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export abstract class FormattingConflicts {
if (selector) {
return await selector(formatter, document, mode);
}
return formatter[0];
return undefined;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class DefaultFormatter extends Disposable implements IWorkbenchContribution {
if (silent) {
// don't wait when formatting happens without interaction
// but pick some formatter...
resolve(formatter[0]);
resolve(undefined);
}
});
}
Expand Down

0 comments on commit d3e19e4

Please sign in to comment.