multihack / multihack-brackets

Realtime collaboration for programmers. (Brackets Extension)
MIT License
24 stars 9 forks source link

Code gets unfolded when other users change something in it #17

Closed tweakimp closed 7 years ago

tweakimp commented 7 years ago

I am using https://github.com/brackets-beautify/brackets-beautify and enabled "format on save". My friend has code folded. Now when I save (to save and format) all his folds get unfolded. I don't know whether it's the saving or the changes by the extension.

t-mullen commented 7 years ago

Code probably unfolds on wholesale changes. I'll see what I can do.

t-mullen commented 7 years ago

Doesn't seem to be any way to fix this on my end. When you beautify, all that folding metadata is discarded: https://github.com/brackets-beautify/brackets-beautify/pull/203/files

I don't think Codemirror even allows me to maintain folds on wholesale changes. :/

I'll reopen if something changes.

t-mullen commented 7 years ago

I now think it might be possible.

t-mullen commented 7 years ago

Ah, I remember why I closed this now. Beautify itself unfolds the code and removes the metadata. It's nothing to do with Multihack.

I think I can prevent code from unfolding during normal editing though.

t-mullen commented 7 years ago

Closing in favour of #40, since this is expressly related to Beautify, which I can't fix.