mizzao / meteor-sharejs

Meteor smart package for transparently adding ShareJS editors to an app
MIT License
225 stars 53 forks source link

Fix immediate undo resetting to 'loading...' text #99

Open edemaine opened 5 years ago

edemaine commented 5 years ago

This mixes a bug in CodeMirror where, after the initial text loads and replaced 'loading...', pressing ctrl-Z undoes that change and goes back to the 'loading...' text. This bug was mentioned in:

The solution was to set the undo stack to size 0 before making the (first) change, then restoring the undo stack size.