(startLine: number, endLine: number)
| 28 | * line, the LSP-idiomatic way to say "through the end of `endLine`". |
| 29 | */ |
| 30 | export function toEditorRange(startLine: number, endLine: number): Range { |
| 31 | const first = toEditorLine(startLine); |
| 32 | const last = Math.max(first, toEditorLine(endLine)); |
| 33 | return { |
| 34 | start: { line: first, character: 0 }, |
| 35 | end: { line: last + 1, character: 0 }, |
| 36 | }; |
| 37 | } |
| 38 | |
| 39 | /** 0-based editor line to 1-based graph line. */ |
| 40 | export function toGraphLine(editorLine: number): number { |