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.
Created attachment 101844 [details] screenshot Type such code in empty C file: int f() { if (1) { ===> Expected code in editor: int f() { if (1) { } } Real: int f() { if (1) { } }
Please evaluate because bug is regression after editor last commits
Editor team, please, evaluate, editing is just broken without any single change on C++ side
Apologies for the regression, it's probably related to issue #189638. When running with -J-Dorg.netbeans.editor.BaseDocument.level=FINE -J-Dnetbeans.debug.editor.document.stack=true and having a simple main.cpp int a() { if (true) {| } and pressing Enter the output shows that there is a reindentation called: ... at org.netbeans.modules.cnd.editor.indent.CppIndentTask.reindent(CppIndentTask.java:88) ... but the '}' stays unindented. Attaching output.
Created attachment 101930 [details] Logging output of pressing Enter
Created attachment 101938 [details] Correct treatment in older version
Created attachment 101946 [details] Correct treatment in older version #2 (previous was shifted by having an extra newline)
There was a change in CCKit:378 instead of original Indent indent = Indent.get(doc); indent.reindent(end + 1); there's Indent.get(doc).indentNewLine(end); from 176554:de609369a4a6 - vstejskal Oct 15, 2008 #120357: updating module dependencies and removing unneccessary use of the old formatting API; full IDE is buildable and runs somehow I have fixed the problem for now by restoring the original code: http://hg.netbeans.org/jet-main/rev/28d079929358
Hi Mila, thanks for investigation > > from > > 176554:de609369a4a6 - vstejskal Oct 15, 2008 > #120357: updating module dependencies and removing unneccessary use of the old > formatting API; full IDE is buildable and runs somehow Just a question, how could change made in 2008 affects what we have now? :-)
Oops, you're right I've just seen the description but I've overlooked the commit date. I'll search more and possibly use another fix.
No, sorry, I was confused I think the code was really integrated on 2010/08/31: Integrated into 'main-golden', will be available in build *201008310001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/de609369a4a6 User: Vita Stejskal <vstejskal@netbeans.org> Log: #120357: updating module dependencies and removing unneccessary use of the old formatting API; full IDE is buildable and runs somehow The wrong date is imho a "feature" of Mercurial (Vita probably started a branch at that time).
Integrated into 'main-golden', will be available in build *201009100000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/28d079929358 User: Miloslav Metelka <mmetelka@netbeans.org> Log: #190122 - Indentation works wrongly in function ('}' has wrong position).
Thanks.