News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Auto-Completion (Ctrl-J) not substituting \n and \t

Started by a1fred0, August 23, 2010, 10:26:17 AM

Previous topic - Next topic

a1fred0

Just built CB and wxWidgets(2.8.11) from source - svn build rev 6502 (2010-08-20 06:00:37) gcc 4.4.1 Windows/unicode - 32 bit

Auto completion is not substituting \n and \t correctly:

e.g. Type forb -> hit Ctrl-J output is: for ( ; ; )\n{\n\t\n}

I searched forums and can find no mention, however, there is an open bug report #017416 that looks the same issue.
On debugger it seems to me that stepping code.Replace(_T("\n"), _T('\n') + lineIndent); in cbEditor::AutoComplete() has no effect on contents of 'code'

Can anyone confirm they see the same issue?

MortenMacFly

Quote from: a1fred0 on August 23, 2010, 10:26:17 AM
e.g. Type forb -> hit Ctrl-J output is: for ( ; ; )\n{\n\t\n}
It's not a bug, it's a mistake in the tempates. Open the abbreviations, change the templates to have true \n \r and it'll work.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

a1fred0

Excellent!! - changed the templates to real newlines as suggested.  Working perfectly. :-)