Skip to content

Commit 52dfdc4

Browse files
committed
Fix protocol docs: diagnostics ranges are 0-based
All clients (emacs, vscode, intellij) send raw editor positions for diagnostics, which are 0-based. Only the newer editor definition and references locations are 1-based on the wire.
1 parent 0cc01d5 commit 52dfdc4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

docs/protocol.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2386,7 +2386,8 @@ interface EditorDiagnostic {
23862386
source: string;
23872387

23882388
/**
2389-
* The diagnostic range (1-based).
2389+
* The diagnostic range (0-based, as editors report them natively;
2390+
* unlike editor definition/references locations, which are 1-based).
23902391
*/
23912392
range: Range;
23922393

0 commit comments

Comments
 (0)