Conversation
Hello, @tfritsch-km, Unfortunately, this solution has a regression. For example, after it changes, we will only use the formatter for an open document when many documents have been modified. Before
After
|
Thank you @mrmlnc for the review. I didn't see the bug since I never use the "save all" feature, thank you for pointing it ! Any idea of a way to do it ? |
As I said above, this is an incorrect fix that solves only one problem and generates new ones. I can't merge this change as it breaks an already existing behavior. But, if it is really important for users, then I can merge this changes under one condition: you need to add an option that disables the new behavior by default. You can also ask the VS Code team about how to fix this problem correctly. |
@mrmlnc I just pushed a fix for the case you mentioned (Save all). |
Hello @mrmlnc have you found any new bug on this PR ? Any chance it gets merged ? |
Hello @mrmlnc sorry to insist but is there something I could do to help or ease the review process ? |
Thank you for that input, @tfritsch-km 馃帀 馃尞 I am sorry to everyone for the long wait. I will add just one commit that will correct the formatting and predicate of the condition for finding a similar document. |
What is the purpose of this pull request?
This PR is intented to resolve issue #112 ie. preserving cursor position and section folding when using
"csscomb.formatOnSave": true,
What changes did you make? (Give an overview)
copy/paste of the code running when using Command Palette "CSSComb: format styles" (onCommand) into the code running when saving file (
onSave
).There definitely should be some refactoring to do but since I'm not sure of what I'm really doing, I prefer leaving as is, since it seems to be working. 馃帀