Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 320666

Summary: [typing] UndoManager sets wrong modificationStamp on DocumentChangeEvent
Product: [Eclipse Project] Platform Reporter: Sebastian Zarnekow <sebastian.zarnekow>
Component: TextAssignee: Platform-Text-Inbox <platform-text-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: minor    
Priority: P3 CC: daniel_megert, thatnitind
Version: 3.6   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Sebastian Zarnekow CLA 2010-07-22 16:44:14 EDT
Steps to reproduce:

1) Create a new text editor with arbitrary input:
foo.txt
=======
bar baz zonk

2) Select some text and copy it to clipboard
3) Paste the text into the file
bar bazbaz zonk

4) Undo -> Editor is clean
5) Paste again
6) Undo -> Editor is still dirty

The problem is probably 

org.eclipse.text.undo.DocumentUndoManager.processChange(int, int, String, String, long, long)#1080
The undoModificationStamp should be the beforeChangeModificationStamp but it is set to the afterChangeModificationStamp.
Comment 1 Dani Megert CLA 2010-07-26 11:35:36 EDT
Not sure this is the right fix. At least our org.eclipse.text.tests.DocumentUndoManagerTest fails.
Comment 2 Dani Megert CLA 2010-07-26 11:40:57 EDT

*** This bug has been marked as a duplicate of bug 127489 ***