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 196794 - Multi-lined macros are not indented properly
Summary: Multi-lined macros are not indented properly
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.0.1
Hardware: PC All
: P3 normal (vote)
Assignee: Alexander Simon
URL:
Keywords:
: 197846 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-03-17 02:30 UTC by sylar
Modified: 2011-07-25 15:10 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 sylar 2011-03-17 02:30:20 UTC
It seems as if the editor does not treat multi-lined macros as code when it comes to indentation. After the trailing escape character the editor forces the cursor to zero indentation on the next line. You can hit tab to indent the cursor as much as you'd like but as soon as you start to enter code the editor forces the cursor back to zero indentation.

Code example:
#define foobar(foo, bar) do {	\
	int f = (foo);		\
	int b = (bar);		\
	f += b;			\
} while (0)

When trying to enter this into the cnd editor the result is:
#define foobar(foo, bar) do {	\
int f = (foo);			\
int b = (bar);			\
f += b;				\
} while (0)
Comment 1 sylar 2011-03-20 04:59:11 UTC
If I try to indent the line myself and start typing code, the editor forces the cursor back to no indentation.
Comment 2 Alexander Simon 2011-06-01 16:20:24 UTC
fixed, change set:
http://hg.netbeans.org/releases/rev/a6246788774d
Comment 3 Quality Engineering 2011-06-02 20:19:25 UTC
Integrated into 'main-golden', will be available in build *201106021001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/0768267f47c8
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed Bug #196794 Multi-lined macros are not indented properly
(transplanted from a6246788774d643444317c494d439c10fa9f85e6)
Comment 4 Alexander Simon 2011-07-25 15:10:02 UTC
*** Bug 197846 has been marked as a duplicate of this bug. ***