Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes bug in UndoManager where entering text while redo stack is not emp... #231

Merged
merged 3 commits into from
Oct 20, 2014

Conversation

bjnsn
Copy link

@bjnsn bjnsn commented Oct 17, 2014

...ty causes error. The error is caught in record and therefore the undo and redo stacks are cleared. The error specifically occurs because the 'oldDelta' does not match the editor state, and more specifically when that means the oldDelta lengths are incorrect. This change causes the oldDelta to be updated whenever the UndoManager has an undo or redo triggered. Related to #229

…empty causes error. The error is caught in record and therefore the undo and redo stacks are cleared. The error specifically occurs because the 'oldDelta' does not match the editor state, and more specifically when that means the oldDelta lengths are incorrect. This change causes the oldDelta to be updated whenever the UndoManager has an undo or redo triggered.
@@ -95,6 +95,8 @@ class UndoManager
@emittedDelta = null
index = this._getLastChangeIndex(change[source])
@quill.setSelection(index, index)
# store updated delta
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is unnecessary

@jhchen
Copy link
Member

jhchen commented Oct 20, 2014

Thank you for the PR. Can you fix the two issues I commented about and I can merge?

@bjnsn
Copy link
Author

bjnsn commented Oct 20, 2014

Updated!

@jhchen
Copy link
Member

jhchen commented Oct 20, 2014

Great thanks!

jhchen added a commit that referenced this pull request Oct 20, 2014
Fixes bug in UndoManager where entering text while redo stack is not empty
@jhchen jhchen merged commit a7c977d into slab:develop Oct 20, 2014
@bjnsn bjnsn deleted the fix-undo-clear branch October 21, 2014 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants