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 230900

Summary: Don't clear file's "redo history" on commit
Product: editor Reporter: pekarna <pekarna>
Component: Actions/Menu/ToolbarAssignee: Miloslav Metelka <mmetelka>
Status: RESOLVED WORKSFORME    
Severity: normal CC: ovrabec
Priority: P3    
Version: 7.3   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description pekarna 2013-06-07 08:24:56 UTC
Today I have lost quite a lot of work this way:

Had some task, finished it, and started next one in the same file.
Then I realized I forgot to commit, so I held the "undo" for a while and commited.

Quite consterned I learnt that commiting erases the "redo history" - I couldn't click redo and all changes were lost.

There's no logic in this - no reason why the redo should be erased.
Could that be left intact?

Filling as defect as it's highly unexpected behavior and causes data loss.

Thanks.
Comment 1 Ondrej Vrabec 2013-06-07 09:23:14 UTC
works for me in:
Product Version: NetBeans IDE 7.3 (Build 201302132200)
Java: 1.7.0_13; Java HotSpot(TM) 64-Bit Server VM 23.7-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_13-b20
System: Linux version 3.1.10-1.19-desktop running on amd64; UTF-8; en_US (nb)

1) edit a java file
2) makes an extra edit, save
3) undo
4) git -> commit
5) redo - works fine

There's the local history keeping all your modifications (History tab in editor) so you should find your modifications there even if redo does not work

Git does not clear anything, the action simply calls LifecycleManager.saveAll() si it's probably editor clearing undo/redo.