I’ve noticed that when using very large files with the MergeView editor, the computed diff between the files is incorrect.
More specifically for my case, I have 2 ~1500+ loc files that have just a couple changes between them (not more than 40-50 loc) spread out throughout the whole document (small diffs at the beginning, middle, and end of the document).
Here’s the diff that I’m expecting to see when using a tool like diffchecker.com.
And this is how it’s rendered in CM using the MergeView. The whole document is basically flagged as one large diff.
Here’s a Gist with repro documents for testing and a playground configured with MergeView. Couldn’t generate a proper share link since the url is too long when using my repro documents.
My use case is very similar to GitHub’s diff mode in PRs. I use CM to look at the version of a source file or compare the source of a file across two different versions. The document is static to the user and is indeed initialized with EditorState.readOnly.of(true) and EditorView.editable.of(false).
If I understand correctly there’s no way of making CM render the content statically and get my desired outcome? Should I be looking at a different framework like prism for my use cases?