Interesting, I had a hunch so I copy/pasted this code into a file to test it out and the code layout got fixed.
Tho if I went to a } and hit enter after it the cursor did move to where you are showing us in your example.
Edit: Tho if I paste the example code in twice the second copy will be missing one indent/set-of-spaces. (as if it has counted one less scope_open)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31 | void myfunc()
{
if(true)
{
int testVar; // Before the if block, it works fine
if(anotherIf)
{
}
int myVar; // Anything after the second if block doesn't get indented properly
}
int testVar2; // It also doesn't work correctly down here
}
void myfunc()
{
if(true)
{
int testVar; // Before the if block, it works fine
if(anotherIf)
{
}
int myVar; // Anything after the second if block doesn't get indented properly
}
int testVar2; // It also doesn't work correctly down here
}
|
Now if you copy and paste all of this code into a 4coder file it will initially be formatted correctly...
((The WRONG idea I wanted to test: Was to add a (few) line(s) in the deepest scope, checking if the scope count didn't get incremented before a scope was filled with something.))