codemirror / dev

Development repository for the CodeMirror editor project
https://codemirror.net/
Other
5.86k stars 372 forks source link

Suggestion: support collapseUnchanged in unified merge view #1427

Closed VasylMarchuk closed 2 months ago

VasylMarchuk commented 2 months ago

Side-by-side Merge View supports collapseUnchanged option, while Unified Merge View does not.

This is quite disappointing and it would be great to have support for collapsing unchanged lines in both views, instead of having to implement a custom extension (which would also be quite challenging to implement without hardcore knowledge of CodeMirror internals).

Thanks!

VasylMarchuk commented 2 months ago

If someone could at least give some hints on how to properly implement such an extension, which would work "on top" of the Unified Merge View — that would be extremely helpful too!

marijnh commented 2 months ago

Attached patch wires up the implementation used in the split view to be available in the unified view.

VasylMarchuk commented 2 months ago

Big thanks for quick reply @marijnh, that's extremely helpful, exactly what I was looking for!