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.

Bug 23315 - Deleting spaces inserted by indentation engine is a pain.
Summary: Deleting spaces inserted by indentation engine is a pain.
Status: RESOLVED WONTFIX
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker with 2 votes (vote)
Assignee: Milutin Kristofic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-10 04:37 UTC by kjmcdonald
Modified: 2016-07-07 07:31 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kjmcdonald 2002-05-10 04:37:33 UTC
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.
Comment 1 Miloslav Metelka 2002-05-10 11:13:37 UTC
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.
Comment 2 Marek Grummich 2002-07-22 12:14:26 UTC
Set target milestone to TBD
Comment 3 Marek Grummich 2002-07-22 12:19:18 UTC
Set target milestone to TBD
Comment 4 Martin Balin 2016-07-07 07:31:04 UTC
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