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.
This is a problem with the real-time editor. Reformatting after the fact corrects the problem. I have my settings set as: [Editor options tab] Expand tabs to spaces = false; Number of space per indent = 2 Tab size = 2 If i type the text: if (true) { and then press return, my caret is indented 4 characters (implemented as 2 tabs) It should have been indented only 1 tab (representing 2 characters) Reformatting the file with Alt-Shift-F formats it correctly.
I forgot to mention that this has not worked for a while and is still not working in 200709190000
I am not sure if this has been looked at yet, but I have a follow-up comment. I am starting to find this is really quite frustrating. As I create and edit more and more complex methods, they are almost unreadable. Doing the Alt-Shift-F still fixes it, but it is pretty distracting to have to do this every couple minutes just to make sure I wrote what I think I did. I don't think NB6 should be released with this bug in it since it pretty much makes variable indent sizes unusable, so I am requesting this get moved to P2. I understand that people generally think that their issues are the most important, so if you don't think custom indent sizes are used enough to warrant a P2 issue, I would understand. However, we have used them here for years and really appreciate the extra information we can fit on our screens. I sincerely would hope this can get fixed before FCS. Thanks, Mark
This works as expected for me, have you changed another formatting setting? (Build 20070919053406)
I don't think so. Is there a file or something I can delete from my user directory that will reset my format settings so I can be sure? Not long ago I deleted the NB 6 user dir and re-imported my 5.5.1 settings. I don't believe I have changed anything since that.
Could you please start NB with a different userdir http://wiki.netbeans.org/wiki/view/FaqAlternateUserdir to check whether that makes any change? Thanks.
I've finally reproduced it. It happened to me only when I set tab size and indentation size to 2 in 5.5.1 and then import my settings to 6.0. The options shows that indentation is 2 but editor uses 4. To recover from the bug, I set indentation to another value (e.g. 3) and then back to 2 and all started to work fine.
*** Issue 116318 has been marked as a duplicate of this issue. ***
Thanks for evaluating this, Jirko.
I tried the work-around for the issue mentioned by jiriprox (changing the indent size to 3 and then back to 2) and this fixed the issue for me as well. Having this work right makes a big difference! Thanks for the tip.
*** Issue 116748 has been marked as a duplicate of this issue. ***
I was planning on reporting that this issue is spreading to the reformat command. I have been getting dailies on a regular basis and it seemed to be getting worse. However, my initial tests of the new daily (200710020000) seem very promising!
Checking in FormatterImpl.java; /cvs/editor/indent/src/org/netbeans/modules/editor/indent/FormatterImpl.java,v <-- FormatterImpl.java new revision: 1.8; previous revision: 1.7 done
*** Issue 117827 has been marked as a duplicate of this issue. ***