run existing terminal if possible
This commit is contained in:
parent
1e1012a2cd
commit
0fc6e9c3e3
1 changed files with 7 additions and 3 deletions
|
|
@ -326,9 +326,13 @@ class IdeProtocolClient {
|
|||
}
|
||||
|
||||
async runCommand(command: string) {
|
||||
const terminal = vscode.window.createTerminal();
|
||||
terminal.show();
|
||||
terminal.sendText(command);
|
||||
if (vscode.window.terminals.length) {
|
||||
vscode.window.terminals[0].sendText(command);
|
||||
} else {
|
||||
const terminal = vscode.window.createTerminal();
|
||||
terminal.show();
|
||||
terminal.sendText(command);
|
||||
}
|
||||
}
|
||||
|
||||
sendCommandOutput(output: string) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue