Bug #17416 2010-08-05 11:17
drakesoft
Auto completion wont work correctly for switch
I get his output if I usw Auto completion with switch():
switch ()\n{\n\tcase :\n\t\tbreak;\n\n\tdefault:\n\t\tbreak;\n}\n
- Category
- Application::Editor
- Group
- Status
- Closed
- Close date
- 2010-10-22 02:36
- Assigned to
- loaden
History
Can you give more details? I can't understand your problem...
If I use "auto completion" (CTRL-J) with switch(), codeblock write this in the same line "switch ()\n{\n\tcase :\n\t\tbreak;\n\n\tdefault:\n\t\tbreak;\n}\n", but codeblocks should write a formated switch() instruction, like this: switch () { case : break; default: break; } I use the codeblocks version "SVN 6435" from the ubuntu PPA:SIMGER
I too have this problem, however, it is for all Auto-completions (Ctrl-J).
I've stepped through the code in cbEditor::AutoComplete() and there seems to be a problem with:
code.Replace(_T("\n"), _T('\n') + lineIndent);
The contents of 'code' remain unchanged after execution. Is this the correct place to be looking?
TDM2-gcc 4.4.1 - wxWidgets 2.8.11
Complete version info: "svn build rev 6502 (2010-08-20 06:00:37) gcc 4.4.1 Windows/unicode - 32 bit"
Could you trying http://forums.codeblocks.org/index.php/topic,13463.0.html and feedback to me?
Thanks!
It seems solved in cc branch.
This bug is now fixed in HEAD.
Thank you for reporting it.
Thank you for fixing this bug and for activ development on codeblocks. Its a realy cool IDE. :-)