Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: a1fred0 on August 23, 2010, 10:26:17 am

Title: Auto-Completion (Ctrl-J) not substituting \n and \t
Post by: a1fred0 on August 23, 2010, 10:26:17 am
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
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?
Title: Re: Auto-Completion (Ctrl-J) not substituting \n and \t
Post by: MortenMacFly on August 23, 2010, 03:02:37 pm
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.
Title: Re: Auto-Completion (Ctrl-J) not substituting \n and \t
Post by: a1fred0 on August 23, 2010, 03:57:26 pm
Excellent!! - changed the templates to real newlines as suggested.  Working perfectly. :-)