Skip to content

Augment CodeMirror instance with detachShareJsDoc()#5

Open
jbpros wants to merge 1 commit intoshare:masterfrom
cucumber-ltd:detach-share-doc
Open

Augment CodeMirror instance with detachShareJsDoc()#5
jbpros wants to merge 1 commit intoshare:masterfrom
cucumber-ltd:detach-share-doc

Conversation

@jbpros
Copy link
Contributor

@jbpros jbpros commented Aug 1, 2014

In a single app context, CodeMirror instances might be attached several times to the same shared doc. This can lead to multiple share channels attached to multiple ghost instances of CodeMirror for the same file, causing an infinite loop while the editors keep appending content to the file.

This new method allows for safely disconnecting a shareJs doc from a CodeMirror instance.

In a single app context, CodeMirror instances might be attached several times to the same shared doc. This can lead to multiple share channels attached to multiple ghost instances of CodeMirror for the same file, causing an infinite loop while the editors keep appending content to the file.

This new method allows for safely disconnecting a shareJs doc from a CodeMirror instance.
@aslakhellesoy
Copy link
Contributor

The build is failing. I suspect it's because you're using ctx.suppress and not suppress. FYI - ctx.suppress is not used on master yet - only on the newcursors branch.

I expect that this change will also make the editor misbehave quite badly.

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