-
Notifications
You must be signed in to change notification settings - Fork 504
Fix indentation rules #694
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
Conversation
snjeza
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still can reproduce the issue #692.
|
mmm that sucks. Seems like this works with vscode insiders but not the last official release. @snjeza can you double check that please? |
|
Looks like the same issue exists in typescript in the last vscode release. Works with insiders (I'm using the same patterns). So I'd say, we ship it anyway. It'll be available to users on regular vscode in early November. |
|
I can also reproduce the issue with code-insiders-1.29.0. I have tested on Windows and Linux. Version: 1.29.0-insider (system setup) The issue can't be reproduced if we exclude the Java extension. |
|
@snjeza FYI I opened microsoft/vscode#62198 upstream |
bda5943 to
c215aee
Compare
c215aee to
21afd6e
Compare
|
@snjeza I'm taking another shot at this old issue, it seems to work now. Please review. |
Signed-off-by: Fred Bricon <[email protected]>
21afd6e to
f2b890b
Compare
|
@snjeza let me know if you can't review this PR, I'll ask someone else |
|
I still can reproduce the problem. fbricon7.mp4 |
|
wait your gif shows the problem is fixed on Java (yeah!), not typescript (we don't care). On the same vscode version, it also works for me on typescript. |
|
@fbricon could you try the following code: and call moveLinesUpAction on line2 |
|
OK so if the line under the if is not indented, moving line 2 up de-increments it, which is not happening with this PR. So we'd be swapping the bug from it's happening if line under if is incremented, to it's happening if line under it is not incremented. Nov-18-2025.19-07-37.mp4So still better than the existing IMO |
datho7561
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is an improvement over the existing behaviour. The bug Snjezana found is annoying, but it only affects the next two lines of code and only happens when the code is formatted "wrong".

... by copying the ones used for js/ts.
Fixes #692