Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minimalEditOperations can break formattings #11593

Closed
jrieken opened this issue Sep 6, 2016 · 13 comments
Closed

minimalEditOperations can break formattings #11593

jrieken opened this issue Sep 6, 2016 · 13 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release important Issue identified as high-priority
Milestone

Comments

@jrieken
Copy link
Member

jrieken commented Sep 6, 2016

Steps in dotnet/vscode-csharp#660 (comment). Regression from 'fixing' #10133

@jrieken jrieken added bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority candidate Issue identified as probable candidate for fixing in the next release labels Sep 6, 2016
@jrieken jrieken self-assigned this Sep 6, 2016
@jrieken jrieken added this to the August 2016 milestone Sep 6, 2016
@jrieken
Copy link
Member Author

jrieken commented Sep 6, 2016

@egamma fyi

@DustinCampbell
Copy link
Member

Thanks for digging into this @jrieken!

@nfantone
Copy link

nfantone commented Sep 6, 2016

@jrieken What about formatting not working at all (rather than messing with characters)? Are we talking about the same thing?

Taken from the original issue:

I work with Unity, but no matter if I open a whole solution or only a .cs file: the formatting of the code with (Shift+Alt+F), or by using the action in the command palette, isn't working.

@jrieken
Copy link
Member Author

jrieken commented Sep 7, 2016

@nfantone Since I don't have reproducible steps for that it's guessing. However, no formatting can happen when the produced edits are really bad (overlapping etc). I am happy to dig further but I do need a repro.

Closing this issue which really was a regression from #10133

@jrieken jrieken closed this as completed Sep 7, 2016
@DustinCampbell
Copy link
Member

Why close this issue? Is it being tracked elsewhere?

@nfantone
Copy link

nfantone commented Sep 7, 2016

@jrieken Sorry for not following you on this: have you closed the issue because if was fixed by ce1f925?

And also, what do you mean by not having "reproducible steps"? For starters, you have a complete project uploaded here from where you can replicate the issue. But, nevertheless, if you would like to see the formatter in action, just create a new C# project and start playing around with the "Format Code" option. It'll take you no more than two minutes to realize that formatting C# scripts just does not work on VSCode. If you really need them for some reason, you can certainly create your own steps - like I did in my previous comment.

@DustinCampbell
Copy link
Member

@nfantone: based on the analysis in dotnet/vscode-csharp#660, I was guessing that the bad edits were hitting some fail safe in the editor that caused it to start ignoring the command.

@nfantone
Copy link

nfantone commented Sep 7, 2016

@DustinCampbell All right. But which one is it? An analysis or a guess? Is this still happening on master? I tried updating Insiders to check it out but there's no new release, yet.

@DustinCampbell
Copy link
Member

It's a guess based on incomplete analysis. 😄

Once there's a new insider's build, we'll know more.

@nfantone
Copy link

nfantone commented Sep 7, 2016

@DustinCampbell @jrieken I'm happily reporting that after updating Insider, formatting now works again on all my Unity projects! Cheers for that.

One minor thing: I had to remap my formatting binding on MacOSX from Shift+Option+F to something else, because that combination kept adding a non-printable character instead.

@nfantone
Copy link

nfantone commented Sep 7, 2016

Now... if only there were a way of configuring format settings consistently across IDEs...

@johanneskopf
Copy link

johanneskopf commented Sep 7, 2016

@DustinCampbell @jrieken Same here - formatting is now working as expected on all my Unity projects on Windows 10.
Thanks for the fix!
I am now enjoying VS Code more than ever before.

@jrieken
Copy link
Member Author

jrieken commented Sep 8, 2016

Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release important Issue identified as high-priority
Projects
None yet
Development

No branches or pull requests

4 participants