This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 242523

Summary: C,C++ formatting does not respect newline setting for opening brace of an initialization
Product: cnd Reporter: eda
Component: EditorAssignee: issues@cnd <issues>
Status: NEW ---    
Severity: normal    
Priority: P4    
Version: 8.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description eda 2014-03-03 19:19:30 UTC
In NB 8.0RC,

To test, set the formatting for C/C++ to a setting which puts openning braces on a new line, such as ANSI.
If there is a structure defined thus:

struct Structure { int a; int b; };

and initialization code is entered with braces on a new line, similar to

Structure s =
{
    2,
    3
};
, which is correct formatting according to the settings,
after formatting, it turns out like this:

Structure s ={
    2,
    3
};

, which is incorrect according to the settings.