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 - C,C++ formatting does not respect newline setting for opening brace of an initialization
Summary: C,C++ formatting does not respect newline setting for opening brace of an ini...
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.0
Hardware: All All
: P4 normal (vote)
Assignee: issues@cnd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-03 19:19 UTC by eda
Modified: 2014-03-05 20:12 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.