Although I get a perfectly fine indentation in 4coder, I get weird stuff when opening a file outside of it.
For example, when I have
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53 | LRESULT CALLBACK win32_MainWindowCallback(HWND hwnd,
UINT message,
WPARAM wParam,
LPARAM lParam)
{
LRESULT result = 0;
switch (message)
{
case WM_SIZE:
{
} break;
case WM_DESTROY:
{
g_Running = false;
} break;
case WM_CLOSE:
{
g_Running = false;
} break;
case WM_ACTIVATEAPP:
{
} break;
case WM_SYSKEYDOWN:
case WM_SYSKEYUP:
case WM_KEYDOWN:
case WM_KEYUP:
{
uint32 vkCode = wParam;
bool32 wasDown = ((lParam & (1 << 30)) != 0);
bool32 isDown = ((lParam & (1 << 31)) == 0);
if (isDown != wasDown)
{
if (vkCode == VK_ESCAPE)
{
g_Running = false;
}
}
} break;
default:
{
result = DefWindowProc(hwnd, message, wParam, lParam);
}
}
return result;
}
|
here is the result when opening it in visual :
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53 | LRESULT CALLBACK win32_MainWindowCallback(HWND hwnd,
UINT message,
WPARAM wParam,
LPARAM lParam)
{
LRESULT result = 0;
switch (message)
{
case WM_SIZE:
{
} break;
case WM_DESTROY:
{
g_Running = false;
} break;
case WM_CLOSE:
{
g_Running = false;
} break;
case WM_ACTIVATEAPP:
{
} break;
case WM_SYSKEYDOWN:
case WM_SYSKEYUP:
case WM_KEYDOWN:
case WM_KEYUP:
{
uint32 vkCode = wParam;
bool32 wasDown = ((lParam & (1 << 30)) != 0);
bool32 isDown = ((lParam & (1 << 31)) == 0);
if (isDown != wasDown)
{
if (vkCode == VK_ESCAPE)
{
g_Running = false;
}
}
} break;
default:
{
result = DefWindowProc(hwnd, message, wParam, lParam);
}
}
return result;
}
|
BTW, when re-openning the file in 4coder I do not get proper indententation on function parameters
| int CALLBACK WinMain(HINSTANCE instance,
HINSTANCE prevInstance,
LPSTR cmdLine,
int cmdShow)
{
HWND window = CreateWindowExA(0,
wc.lpszClassName,
...);
}
|
Anything I should change to 4coder_auto_indent.cpp to make this work properly ?
Thanks !