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 245131 - Cannot control formatting of lines after a label
Summary: Cannot control formatting of lines after a label
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.0
Hardware: PC Linux
: P3 normal (vote)
Assignee: Alexander Simon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-18 23:19 UTC by seanreque
Modified: 2016-07-22 01:52 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 seanreque 2014-06-18 23:19:06 UTC
Netbeans C++ forces an indent after a label. 
-------
Example:

    statement;
label:
        forced-indented-statement.
-----------

This forced indent is incredibly frustrating as the editor is constantly fighting me about it. One should be able to disable this indent in the formatting section.
Comment 1 Alexander Simon 2016-07-21 13:36:16 UTC
Sorry, I do not exactly understand what you mean.
I fixed test case:
===================
void foo(int i) {
    while (1) {
        i++;
label:|
        i++;
    }
}
===================
after enter is indented to:
===================
void foo(int i) {
    while (1) {
        i++;
label:
        |
        i++;
    }
}
===================
where | is a cursor position.
Fixed in change set:
http://hg.netbeans.org/cnd-main/rev/fdd198432247

Please, reopen the bug with clear test case if your mean another bug.
Comment 2 Quality Engineering 2016-07-22 01:52:14 UTC
Integrated into 'main-silver', will be available in build *201607220002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/fdd198432247
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed Bug #245131 Cannot control formatting of lines after a label