(editor: TextEditor, displayRange: Range, highlightRange: Range, selectionRange?: Range)
| 234 | // where the line ends. |
| 235 | |
| 236 | export function showCode(editor: TextEditor, displayRange: Range, highlightRange: Range, selectionRange?: Range): void { |
| 237 | if (selectionRange) |
| 238 | editor.selection = new Selection(selectionRange.start, selectionRange.end); |
| 239 | |
| 240 | // Ensure the code is visible on screen. |
| 241 | editor.revealRange(displayRange, TextEditorRevealType.InCenterIfOutsideViewport); |
| 242 | |
| 243 | // TODO: Implement highlighting |
| 244 | // See https://github.com/Microsoft/vscode/issues/45059 |
| 245 | } |
| 246 | |
| 247 | function trimTrailingSlashes(s: string) { |
| 248 | return s.replace(/[/\\]+$/, ""); |
no outgoing calls
no test coverage detected