@codemirror-state.js:10 Uncaught RangeError: Invalid position -3 in document of length 40
at TextLeaf.lineAt (@codemirror-state.js:10:19)
at fromLine (@codemirror-merge.js:648:19)
at toChunks (@codemirror-merge.js:660:30)
at Chunk.build (@codemirror-merge.js:631:16)
at new MergeView (@codemirror-merge.js:1192:29)
at <anonymous>:7:12
Describe the issue
Repro link included, which produces the error
Browser and platform
All, afaict
Reproduction link
https://codemirror.net/try/?c=aW1wb3J0IHtNZXJnZVZpZXd9IGZyb20gIkBjb2RlbWlycm9yL21lcmdlIgppbXBvcnQge0VkaXRvclZpZXcsIGJhc2ljU2V0dXB9IGZyb20gImNvZGVtaXJyb3IiCmltcG9ydCB7RWRpdG9yU3RhdGV9IGZyb20gIkBjb2RlbWlycm9yL3N0YXRlIgoKbGV0IGRvYyA9ICd4eHhcbicucmVwZWF0KDEwKQoKbGV0IHZpZXcgPSBuZXcgTWVyZ2VWaWV3KHsKICBhOiB7CiAgICBkb2MKICB9LAogIGI6IHsKICAgIGRvYzogJ1xuJwogIH0sCiAgcGFyZW50OiBkb2N1bWVudC5ib2R5Cn0p