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.
Hi. If I have code that is indented many levels, and I hit enter by mistake, the cursor is indented automatically on the next line. Instead of hitting <BackSpace> one time to remove the newline, I am forced to hit it repeatedly to remove each space that was added by the indentation. I'm not sure what the solution should be. One option would be to make the backspace key delete all the way to the beginning of the line if there are only spaces between the cursor and the beginning of the line (and possibly only spaces on the line *at all*.) This would mean that I'd still need to hit the key twice to undo the newline, but even that is alot better. Another advantage of this is that it can be used to easily clean up any line that only has spaces on it. Many times i put multiple blank lines, and then come back alot later to remove them. Whether I use <BackSpace> or <Delete> it's a pain to delete each and every space. But since it might be a while till they are deleted, linking this enhancement to 'having just done something that triggered the indentation engie' is probably not the way to go. I suppose the indentation engine could just put the newline in, and wait untill something else is typed on the same line to add the spaces to indent the line. I think I like this idea best becuase this means you never have lines that only contain spaces. On the same note, it would be nice if the 'indent whole-file' action could remove the spaces from lines that didn't have anything else on them.
Please use the Ctrl+Z to make undo if you hit Enter and then you want to get back to the previous state. We want to improve the indentation engine to remove the existing extra spaces and not to add any other unnecessary spaces.
Set target milestone to TBD
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss