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

Wrong indent on new lines after switch statements #708

Closed
peterflynn opened this issue Aug 7, 2012 · 0 comments
Closed

Wrong indent on new lines after switch statements #708

peterflynn opened this issue Aug 7, 2012 · 0 comments

Comments

@peterflynn
Copy link
Contributor

Start by opening http://codemirror.net/demo/theme.html and pasting in this code:

function foo(a) {
  switch (a) {
    case 1:
      break;
  }
}

Then:

  1. Place cursor on the first "}" and press Enter
  2. Place cursor on the last "}" and press Enter

Result:
In both cases, you get 6 spaces (3 tabs) of indent, so your cursor is lined up with the "break" statement.

Expected result:

  1. 2 spaces (1 tab) of indent, so cursor is lined up with the first "}"
  2. 0 spaces of indent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants