This repository has been archived by the owner on Apr 17, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(set-text-via-diff): base use on option instead of flaky buffer ra…
…nge comparison We were determining whether or not to use setTextViaDiff (more performant) versus the normal setTextInBufferRange (less performant but allows replacing only a subset of text in a file if desired) by whether or not the buffer range of the file equaled the buffer range of the text to be transformed. However, in some cases such as when the editor automatically inserts an ending newline, these two ranges can become unequal and we revert to using setTextInBufferRange. This is less performant and not really necessary. The fix is to just pass an option when calling `executePrettierOnBufferRange` from `formatOnSave`.
- Loading branch information
Showing
6 changed files
with
26 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters