Function
openVirtualDoc
(file: string, content: string, preserveFocus: boolean, preview: boolean, viewColumn: number)
Source from the content-addressed store, hash-verified
| 9 | }; |
| 10 | |
| 11 | export async function openVirtualDoc(file: string, content: string, preserveFocus: boolean, preview: boolean, viewColumn: number): Promise<void> { |
| 12 | if (content) { |
| 13 | const uri = vscode.Uri.parse(`${docScheme}:${file}?${content}`); |
| 14 | const doc = await vscode.workspace.openTextDocument(uri); |
| 15 | await vscode.window.showTextDocument(doc, { |
| 16 | preserveFocus: preserveFocus, |
| 17 | preview: preview, |
| 18 | viewColumn: viewColumn |
| 19 | }); |
| 20 | } |
| 21 | } |
Tested by
no test coverage detected