Bug of code formatter about line warpping [message #1392379] |
Wed, 02 July 2014 08:42 |
Yu Chen Messages: 5 Registered: December 2013 |
Junior Member |
|
|
It seems the forum does not support spaces and tabs at the beginning of line, so I use dots to replace the spaces.
It occurs when the arguments are marcos. For example,
void fun(int a, int b){
}
int main()
{
....int THIS_IS_A_LONG_NAME_FOR_TEST_THE_WRAPING;
....fun(THIS_IS_A_LONG_NAME_FOR_TEST_THE_WRAPING, THIS_IS_A_LONG_NAME_FOR_TEST_THE_WRAPING);
}
The code formatter works well and the code would be formatted as
void fun(int a, int b){
}
int main()
{
....int THIS_IS_A_LONG_NAME_FOR_TEST_THE_WRAPING;
....fun(THIS_IS_A_LONG_NAME_FOR_TEST_THE_WRAPING,
............THIS_IS_A_LONG_NAME_FOR_TEST_THE_WRAPING);
}
However, if the code is
void fun(int a, int b){
}
#define THIS_IS_A_LONG_NAME_FOR_TEST_THE_WRAPING c
int main()
{
....int c;
....fun(THIS_IS_A_LONG_NAME_FOR_TEST_THE_WRAPING, THIS_IS_A_LONG_NAME_FOR_TEST_THE_WRAPING);
}
After calling coder formatter twice(Use Ctrl+Shift+F for twice), the code would be formatted as
void fun(int a, int b){
}
#define THIS_IS_A_LONG_NAME_FOR_TEST_THE_WRAPING c
int main()
{
....int c;
....fun(THIS_IS_A_LONG_NAME_FOR_TEST_THE_WRAPING,
....THIS_IS_A_LONG_NAME_FOR_TEST_THE_WRAPING);
}
without the two tabs of indent.
[Updated on: Wed, 02 July 2014 08:45] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.02813 seconds