Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 320666 - [typing] UndoManager sets wrong modificationStamp on DocumentChangeEvent
Summary: [typing] UndoManager sets wrong modificationStamp on DocumentChangeEvent
Status: CLOSED DUPLICATE of bug 127489
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.6   Edit
Hardware: All All
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-22 16:44 EDT by Sebastian Zarnekow CLA
Modified: 2010-07-26 11:40 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***