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.
After reformatting this code: puts( foo(3) do puts "a\n", "b\n" end ) Seems like "b\n" should be indented one more level. Product Version: NetBeans Ruby IDE 20071001112247 Java: 1.6.0_01; Java HotSpot(TM) Client VM 1.6.0_01-b06 System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nbrubyide) Userdir: C:\Users\James\AppData\Roaming\.nbrubyide\dev
I see the problem. The reason this happens is that you have a normal line continuation inside an argument list. I specifically disabled line-continutations for that scenario because without it, a normal parenthesis list would look line line continuations: // If there's a comma it's a continuation operator, but inside arrays, hashes or parentheses // parameter lists we should not treat it as such since we'd "double indent" the items, and // NOT the first item (where there's no comma, e.g. you'd have // foo( // firstarg, // secondarg, # indented both by ( and hanging indent , // thirdarg) I can definitely make this logic more clever, but I can't think of something simple and low risk now hours before the freeze, and, I don't think this is a must-fix bug for 6.0 since the scenario hasn't come up in the various large Ruby source files (from the Ruby library and the Rails library) that I used to diff my formatter with the manually formatted code in those files (to see where the algorithm was inadequate). So, marking this one for the update release.