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 168458 - In macros, even if remove-trailing-spaces is first, it removes any spaces inserted by later commands!
Summary: In macros, even if remove-trailing-spaces is first, it removes any spaces ins...
Status: RESOLVED WONTFIX
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-13 08:11 UTC by ayqazi
Modified: 2015-09-17 11:36 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ayqazi 2009-07-13 08:11:05 UTC
Hi,

I've got this macro that I used in NetBeans 6.5:

reindent-line remove-trailing-spaces insert-break

In NetBeans 6.5, it will make the line the cursor was on 'correct' - indented, no trailing spaces (no spaces at all if
there is no text on the line) - then move to the next line and indent to the right level.  Exactly what I want.

In NetBeans 6.7, the remove-trailing-spaces also seems to affect the NEXT line AFTER insert-break executes.  The indent
that insert-break correctly places gets removed.

Why is it doing that?  I'm pretty sure it's a bug.  It doesn't make sense for a macro command that comes before, to
suddenly apply itself to a command that comes AFTER it.

Thanks
Comment 1 mslama 2009-07-13 18:35:39 UTC
How do you record reindent-line and remove-trailing-spaces? I assume insert-break is Enter.
Comment 2 ayqazi 2009-07-14 08:49:53 UTC
Argh - target milestone 6.8?  I've got to wait 'til the next release for this to get fixed?  Oh well, back to 6.5 - it
has some other problems that are annoying me as well...

Yes, insert-break is (or was, before I reassigned it) Enter.

reindent-line was TAB, before I reassigned it to this macro.

remove-trailing-spaces is available from the menu.
Comment 3 Vitezslav Stejskal 2009-07-14 15:08:07 UTC
"I've got to wait 'til the next release for this to get fixed?" - Actually, you don't have to. You can always fix it
yourself :-).
Comment 4 ayqazi 2009-07-14 17:20:17 UTC
If I do hack the code myself, will I still be able to install plugins?  And will the next release of netbeans still pick
up my config and import it?
Comment 5 Vitezslav Stejskal 2009-07-15 10:52:21 UTC
Yes. Plus if you attach the patch here and if it looks reasonably ok we will integrate it and be forever thankful :-).
Comment 6 Martin Balin 2015-09-17 11:36:13 UTC
Report from old NetBeans version. Due to code changes since it was reported likely not reproducible now. Feel free to reopen if happens in 8.0.2 or 8.1.