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.
Not sure offhand if this exists also in 6.9, but I think I have seen it only in dev builds; may be related to jtulach's work on UndoRedo.Provider. If I have made some edits to a file, perhaps saved it, and then accidentally type another bogus character and press Ctrl-Z, *two* edits are undone: my bogus change, and also the other unrelated last edit which was intentional. Ctrl-Y restores both edits. There is no apparent way to just undo the last edit.
Very annoying regression, can someone evaluate, please?
Product Version: NetBeans IDE Dev (Build 100708-a516ca9891a9) Java: 1.6.0_14; Java HotSpot(TM) Client VM 14.0-b16
(In reply to comment #0) > Not sure offhand if this exists also in 6.9, but I think I have seen it only in > dev builds; may be related to jtulach's work on UndoRedo.Provider. If I have > made some edits to a file, perhaps saved it, and then accidentally type another > bogus character and press Ctrl-Z, *two* edits are undone: my bogus change, and > also the other unrelated last edit which was intentional. Ctrl-Y restores both > edits. There is no apparent way to just undo the last edit. This annoying thing appeared to me only after i installed the latest dev build. Product Version = NetBeans IDE Dev (Build 2010-07-12_20-18-52 ) Operating System = Windows XP version 5.1 running on x86 SP3 Java; VM; Vendor = 1.6.0_20 Runtime = Java HotSpot(TM) Client VM 16.3-b01 I can confirm it doesn't exists in 6.9.0
You can type one more character and then do undo. This will undo both, right?
I use dev builds and it's more and more difficult to accept that undo doesn't work reliably at all. Doing 2 independent modifications (one fine and one incorrect) I'm loosing my work with current "undo" and have to "redo" all and delete what I wanted to "undo" manually
PHP build Product Version: NetBeans IDE 6.9.1 Dev (Build 201006282301) Java: 1.6.0_20; Java HotSpot(TM) 64-Bit Server VM 16.3-b01 System: Linux version 2.6.32-23-generic running on amd64; UTF-8; en_US (nb) I've been intensively working in last few days and I did not notice nor I can reproduce such behavior.
NetBeans IDE Dev (Build 201007180001) and I have this same issue. Undo is undoing too much.
I will try to have a quick look before Mila is back from vacation.
Reverting Jarda's changes did not fix it (at least I think it did not). Let's wait for Mila ...
I'm testing in a build from 100727 and it seems to work fine (undos not merged both without an intermediate Save or with it). Could anyone possibly provide steps to reproduce in current builds? Thanks.
I'm now able to reproduce the problem.
*** Bug 188893 has been marked as a duplicate of this bug. ***
I have finally found a cause of the problem. Steps: 1) Have a java file with a line with an existing text e.g. "private int i = 5;" 2) Modify "private" to "privatex" 3) Save file 4) Modify "int" to "inty" 5) Undo. Strangely both "int" and "private" words are undone at once. Reason: BeforeSaveTasks requests BaseDocument.markAtomicEditsNonSignificant() since it must merge with any previous edits already present in an undo manager. Unfortunately if there's no actual modification from trailing whitespace removal then an empty BD.AtomicCompoundEdit with nonSignificant flag turned on will stay in the BaseDocument and it will be picked by a first after-save operation which will then merge with before-save edit. http://hg.netbeans.org/jet-main/rev/025f14166ef5
Integrated into 'main-golden', will be available in build *201007310001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/025f14166ef5 User: Miloslav Metelka <mmetelka@netbeans.org> Log: #188409 - Undo undoes too much.