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

Moving line past switch statement removes indentation in that #31864

Closed
chrmarti opened this issue Aug 1, 2017 · 1 comment
Closed

Moving line past switch statement removes indentation in that #31864

chrmarti opened this issue Aug 1, 2017 · 1 comment
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug editor-autoindent Editor auto indentation issues wont-fix
Milestone

Comments

@chrmarti
Copy link
Collaborator

chrmarti commented Aug 1, 2017

  • VSCode Version: Code - Insiders 1.15.0-insider (f39385b, 2017-08-01T05:07:59.267Z)
  • OS Version: Darwin x64 16.6.0
  • Extensions: none

Testing #31831

Moving a line past a switch statement:
movinglinethroughswitch

Text:

var foo = 1 + 2;
switch (foobar) {
    case 1:
        var a = 2;
        break;
    case 2:
    default:
        var b = 4;
        break;
}
@chrmarti chrmarti added editor editor-autoindent Editor auto indentation issues labels Aug 1, 2017
@vscodebot vscodebot bot added the insiders label Aug 1, 2017
@rebornix rebornix added the bug Issue identified by VS Code Team member as probable bug label Aug 2, 2017
@rebornix rebornix added this to the Backlog milestone Aug 2, 2017
@chrmarti chrmarti removed the insiders label Sep 27, 2017
@alexdima alexdima removed the editor label Nov 23, 2017
@rebornix
Copy link
Member

rebornix commented Nov 3, 2020

This is due to the limited architecture (regex based indentation rules and only support limited code styles), we may want to consider using formatters if they exist for indenation adjustment (if interested, we can discuss in #19847).

For this particular issue, if the indentation rules are leading to more trouble than having no auto indent, you can set editor.autoIndent to advanced to disable the regex based indentation adjustment. As we don't have an easy good-enough fix for it, we close it for now and explore better solutions through issues like #19847.

@rebornix rebornix closed this as completed Nov 3, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Dec 19, 2020
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 editor-autoindent Editor auto indentation issues wont-fix
Projects
None yet
Development

No branches or pull requests

3 participants