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.
I'd like to input code in this format: function foo($bar) { // code here } After I input function foo($bar) and press Enter, the cursor is indented: function foo($bar) <TAB>(Cursor here) I think it's ok. However, when I type the first brace {, I expect the editor to remove <TAB>. In fact it doesn't: function foo($bar) <TAB>{ <TAB>} The correct output should be function foo($bar) { }
I guess that behavior is correct ... However, I let the developer to evaluate. @reporter: we are missing your build number. Thanks.
Sorry I double checked and function doesn't have such problem. However, if, for, foreach, while, do have such issue.
My version is 6.8 Beta.
You are right. The behavior should be more clever and when a user write { it should remove the tabs as you expect. Is too late to fix it for nb 6.8. I will fix it for the next release.
similar bug in 6.8: if(1) { expected: if(1) {
I can confirm this on Product Version: NetBeans IDE 6.8 (Build 200912041610). If i remember correctly, this bug was not present in 6.7.
Fixed by recent changes in the indentation engine. Works in NetBeans 6.9 builds.