mirror of
https://github.com/Microsoft/vscode
synced 2024-10-16 08:22:51 +00:00
Add (Local) to the local terminal title
Part of microsoft/vscode-remote-release#730
This commit is contained in:
parent
40bbb20c60
commit
3ccdd1e63d
|
@ -34,6 +34,15 @@ export class CreateNewLocalTerminalAction extends Action {
|
|||
if (!instance) {
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
|
||||
// Append (Local) to the first title that comes back, the title will then become static
|
||||
const disposable = instance.onTitleChanged(() => {
|
||||
if (instance.title && instance.title.trim().length > 0) {
|
||||
disposable.dispose();
|
||||
instance.setTitle(`${instance.title} (Local)`, false);
|
||||
}
|
||||
});
|
||||
|
||||
this.terminalService.setActiveInstance(instance);
|
||||
return this.terminalService.showPanel(true);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue