mirror of
https://github.com/godotengine/godot-vscode-plugin.git
synced 2025-12-31 13:48:24 +03:00
Merge pull request #84 from lleaff/feat-reuse-term
Close existing terminal when executing "run" commands
This commit is contained in:
@@ -196,7 +196,11 @@ class ToolManager {
|
||||
if (!fs.existsSync(editorPath) || !fs.statSync(editorPath).isFile()) {
|
||||
vscode.window.showErrorMessage("Invalid editor path to run the project");
|
||||
} else {
|
||||
let terminal = vscode.window.createTerminal("Godot");
|
||||
let existingTerminal = vscode.window.terminals.find(t => t._name === "GodotTools")
|
||||
if (existingTerminal) {
|
||||
existingTerminal.dispose()
|
||||
}
|
||||
let terminal = vscode.window.createTerminal("GodotTools");
|
||||
editorPath = this.escapeCmd(editorPath);
|
||||
let cmmand = `${editorPath} ${params}`;
|
||||
terminal.sendText(cmmand, true);
|
||||
|
||||
Reference in New Issue
Block a user