Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Strange behavior with uneven amount of cases #2297

Closed
Janpot opened this issue Dec 6, 2012 · 1 comment
Closed

Strange behavior with uneven amount of cases #2297

Janpot opened this issue Dec 6, 2012 · 1 comment

Comments

@Janpot
Copy link

Janpot commented Dec 6, 2012

Consider following code in the editor:

switch (x) {
case 0: break;
case 1: break;
case 2: break;
}
    <-- cursor goes here

If I place the cursor after the last curly brace and press 'enter', the next line is indented with two tabs. It happens everywhere I press 'enter' in the file after this piece of code. The issue only happens when I use an uneven amount of cases. If I put an even amount of cases the indentation is correct:

switch (x) {
case 0: break;
case 1: break;
case 2: break;
case 3: break;
}
<-- cursor goes here

The issue also doesn't happen when I specify a default.

switch (x) {
case 0: break;
default:;
}
<-- cursor goes here
@njx
Copy link
Contributor

njx commented Dec 6, 2012

Thanks for filing--this is actually already filed as #1324. Closing as a duplicate.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants