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 247275 - Source formatting messing up on compound literals in C project
Summary: Source formatting messing up on compound literals in C project
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.0.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Alexander Simon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-18 16:47 UTC by antoniocs
Modified: 2016-07-21 12:31 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 antoniocs 2014-09-18 16:47:26 UTC
I have this line of code:

                if (tag_end(m, &c)) {
                    if (tag_end_last(m, ((char[]) {text_get_char(m)}))) {
                        printf("Found end tag!!!\n");
                        return 0;
                    } else {
                        pos_dec(m);
                    }
                }

After I go to Source > Format that code changes to this:

                if (tag_end(m, &c)) {

                    if (tag_end_last(m, ((char[]) {
                            text_get_char(m)}))) {
                    printf("Found end tag!!!\n");
                    return 0;
                } else {
                        pos_dec(m);
                    }
                }

I would expect the code to just stay as it was initially
Comment 1 Alexander Simon 2016-07-21 12:31:43 UTC
Fixed in development version.