-
Notifications
You must be signed in to change notification settings - Fork 27.9k
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
hitting shift enter before a } adds an indent #37136
Comments
Folding related so pass to @aeschli |
Reproduced with this example:
The problem is that pressing enter before
So the folding region no longer ends with Ideally this can be fixed in the auto indent strategy, to no add any indent before '}' |
@aeschli Shouldn't an edit inside a folded region cause the region to become unfolded ? This is an intersection of two features, so leaving both owners... i.e. folding is correct without autoindent, autoindent is correct without folding... |
Ahhh it's an auto indent thing, hmmmmmmm, if I can help in any way.. Otherwise, have fun with this one aeschli :') |
@alexandrudima It's not really inside the folded region, just outside. |
Auto indent also is wrong without folding. |
this also happens with no } present if you're interested |
Yes, inside a block you want the indent. But before a closing bracket you want a reduced indent. |
@aeschli there might be issues with auto indent but when auto indent is correct, the problem @lopugit described still existed 1.19-Insiders, TypeScript file. In above gif, I tried to run |
@rebornix Oh, now I see it, it's with |
Steps to Reproduce:
super annoying because it means you have to unfold every level of folded content before you can insert text between a line of text that is right below the folded content, because when you fold content it folds all blank lines below it too, meaning that when you shift enter to insert a block of code, it's impossible to do so without unfolding
If someone can point me in the direction of where this code might be stored I will try to rewrite it myself
Reproduces without extensions: Yes
GIF:
https://gyazo.com/27c8ba04bc93410d7eb2005abb5fd0bb
The text was updated successfully, but these errors were encountered: