I'm writing vscode extension.
I opened a TextDocument with vscode.window.showTextDocument
, and want to close it later. But I can't find api to close it. Finally I found this commit, it removed closeTextDocument
. What should I do now?
To uninstall an extension, select the Manage gear button at the right of an extension entry and then choose Uninstall from the dropdown menu. This will uninstall the extension and prompt you to reload VS Code.
Tip: You can move the Side Bar to the right hand side (View > Move Side Bar Right) or toggle its visibility (Ctrl+B).
First of all, we need to stop the background running the c program by pressing the Alt + Ctrl + M from the keyboard.
I encountered the same problem. The only way I managed to do it is via workbench.action.closeActiveEditor
, as recommended by the inline documentation for TextEditor.hide
.
It's hackish - basically show the document in the editor, then close the active editor:
vscode.window.showTextDocument(entry.uri, {preview: true, preserveFocus: false})
.then(() => {
return vscode.commands.executeCommand('workbench.action.closeActiveEditor');
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With