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 241446 - Wrong indent after "Surround with..."
Summary: Wrong indent after "Surround with..."
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.0
Hardware: PC Solaris
: P3 normal (vote)
Assignee: Alexander Simon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-05 14:18 UTC by soldatov
Modified: 2014-02-07 02:38 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 soldatov 2014-02-05 14:18:57 UTC
Scenario:
- Create C++ project
- Open main.cpp file
- Type in main() function:
    int a = 1; // 16th line
    int b = 1;
    b++;
    a++;
- Move cursor into 17:1 point
- Press Shift+Down Arrow key 2 times (select 2 lines)
- Press Alt+Enter
- Select 'if' ("Surround with if (exp) { ...| }" menu item)
===>
Expected code:
    int a = 1;
    if (exp) {
        int b = 1;
        b++;
    }
    a++;
Real code:
    int a = 1;
    if (exp) {
        int b = 1;
        b++;
    }
        a++; // <-- wrong indent
Comment 1 Alexander Simon 2014-02-06 14:58:09 UTC
fixed, change set:
http://hg.netbeans.org/cnd-main/rev/d17a25c36e59
Comment 2 Quality Engineering 2014-02-07 02:38:04 UTC
Integrated into 'main-silver', will be available in build *201402070001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/d17a25c36e59
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed Bug #241446 Wrong indent after "Surround with..."