| 270 | // this is because we cannot tell the view column of a file if it is not visible |
| 271 | // (e.g., is an unopened tab) |
| 272 | public async showSource(): Promise<void> { |
| 273 | if (this.activePreview?.filePath) { |
| 274 | await vscode.commands.executeCommand('vscode.open', vscode.Uri.file(this.activePreview.filePath), { |
| 275 | preserveFocus: false, |
| 276 | preview: false, |
| 277 | viewColumn: this.activePreview?.preview?.resourceViewColumn ?? this.activePreview?.preview?.panel.viewColumn ?? vscode.ViewColumn.Active |
| 278 | }); |
| 279 | } |
| 280 | } |
| 281 | |
| 282 | public async openExternalBrowser(): Promise<void> { |
| 283 | if (this.activePreview.preview) { |