(editor: vscode.TextEditor)
| 10 | * @param editor A visible editor |
| 11 | */ |
| 12 | export function getDisplayLineMap(editor: vscode.TextEditor) { |
| 13 | return new Map( |
| 14 | flow( |
| 15 | flatten, |
| 16 | uniq |
| 17 | )( |
| 18 | concat( |
| 19 | [[editor.selection.start.line]], |
| 20 | editor.visibleRanges.map((visibleRange) => |
| 21 | range(visibleRange.start.line, visibleRange.end.line + 1) |
| 22 | ) |
| 23 | ) |
| 24 | ) |
| 25 | .sort((a, b) => a - b) |
| 26 | .map((value, index) => [value, index]) |
| 27 | ); |
| 28 | } |
no outgoing calls
no test coverage detected