Bug #11413 2007-06-18 19:01

javierous

Smart Indent not indenting new line after {

In previous builds with smart indent on, you would type:

if (asd) {

<--- and the new line after that one gets indented

The last nightly build I have with this working is one from december, but I know this was working on a more recent build.

Category
Application::Editor
Group
 
Status
Closed
Close date
2007-06-28 09:51
Assigned to
 
javierous 2007-06-18 19:21
In cbEditor::OnEditorCharAdded the switch-case which handles this says:

switch(stc->GetLexer())
{
    case wxSCI_LEX_CPP:
        if (b == _T('{'))
        	// put tab
        break;
    case wxSCI_LEX_PYTHON:
        if (b == _T(':'))
        	// put tab
        break;
}

But there are several supported languages that would benefit from smartindenting {, like Perl for example.
mandrav 2007-06-28 09:51

Works fine here. And, as you probably see from the code, it should work for you too (unless you 're testing with other file types?).

In that code there's also a comment:

// SMART INDENTING - THIS IS LANGUAGE SPECIFIC, BUT CURRENTLY ONLY IMPLEMENTED FOR C/C++ AND PYTHON

So, if you want smart indent support for some other language, please file a feature request.