|
@@ -347,6 +347,7 @@ export function addCommands(
|
|
|
}
|
|
|
|
|
|
const name = args['name'] as string;
|
|
|
+ const cwd = args['cwd'] as string;
|
|
|
|
|
|
let session;
|
|
|
if (name) {
|
|
@@ -358,12 +359,12 @@ export function addCommands(
|
|
|
} else {
|
|
|
// we are restoring a terminal widget but the corresponding terminal was closed
|
|
|
// let's start a new terminal with the original name
|
|
|
- session = await serviceManager.terminals.startNew({ name });
|
|
|
+ session = await serviceManager.terminals.startNew({ name, cwd });
|
|
|
}
|
|
|
} else {
|
|
|
// we are creating a new terminal widget with a new terminal
|
|
|
// let the server choose the terminal name
|
|
|
- session = await serviceManager.terminals.startNew();
|
|
|
+ session = await serviceManager.terminals.startNew({ cwd });
|
|
|
}
|
|
|
|
|
|
const term = new Terminal(session, options, translator);
|