This repository was archived by the owner on Apr 15, 2026. It is now read-only.
This repository was archived by the owner on Apr 15, 2026. It is now read-only.
nextDiagnostic only selects part of the diagnostic when there is overlapping #1671
Describe the issue
Some linters may generate overlapping diagnostics. When there are overlapping diagnostics,
nextDiagnosticonly selects part of a diagnostic, which can be confusing. Like in the example below, when placing the cursor at the beginning of the document, pressingF8for the first time selects only the first line of a warning.I think it is expected to select the entire range of the diagnostic.
Browser and platform
No response
Reproduction link
https://codemirror.net/try/#c=aW1wb3J0IHtFZGl0b3JWaWV3LCBrZXltYXB9IGZyb20gJ0Bjb2RlbWlycm9yL3ZpZXcnCmltcG9ydCB7bGludGVyLCBsaW50S2V5bWFwfSBmcm9tICdAY29kZW1pcnJvci9saW50JwoKbmV3IEVkaXRvclZpZXcoewogIGRvYzogInBhcnQgb2Ygd2FybmluZ1xuZXJyb3JcbnBhcnQgb2Ygd2FybmluZyIsCiAgZXh0ZW5zaW9uczogWwogICAgbGludGVyKCgpID0+IFsKICAgICAge2Zyb206IDAsIHRvOiAzNywgc2V2ZXJpdHk6ICd3YXJuaW5nJywgbWVzc2FnZTogJ0xpbmVzIDEtMyd9LAogICAgICB7ZnJvbTogMTYsIHRvOiAyMSwgc2V2ZXJpdHk6ICdlcnJvcicsIG1lc3NhZ2U6ICdMaW5lIDInfSwKICAgIF0pLAogICAga2V5bWFwLm9mKGxpbnRLZXltYXApCiAgXSwKICBwYXJlbnQ6IGRvY3VtZW50LmJvZHkKfSkK