提交 3ccdd1e6 编写于 作者: D Daniel Imms

Add (Local) to the local terminal title

Part of microsoft/vscode-remote-release#730
上级 40bbb20c
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册