From 5d99197f40c01b09e631a86885ba33e8af5e7080 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 17 Jul 2017 16:31:00 +0200 Subject: [PATCH] title: update title when workspace name changes --- src/vs/workbench/browser/parts/titlebar/titlebarPart.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts b/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts index 94a55583f65..ddec896ba25 100644 --- a/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts +++ b/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts @@ -100,6 +100,7 @@ export class TitlebarPart extends Part implements ITitleService { this.toUnbind.push(this.configurationService.onDidUpdateConfiguration(() => this.onConfigurationChanged(true))); this.toUnbind.push(this.editorGroupService.onEditorsChanged(() => this.onEditorsChanged())); this.toUnbind.push(this.contextService.onDidChangeWorkspaceRoots(() => this.onDidChangeWorkspaceRoots())); + this.toUnbind.push(this.contextService.onDidChangeWorkspaceName(() => this.onDidChangeWorkspaceName())); } private onBlur(): void { @@ -116,6 +117,10 @@ export class TitlebarPart extends Part implements ITitleService { this.setTitle(this.getWindowTitle()); } + private onDidChangeWorkspaceName(): void { + this.setTitle(this.getWindowTitle()); + } + private onConfigurationChanged(update?: boolean): void { const currentTitleTemplate = this.titleTemplate; this.titleTemplate = this.configurationService.lookup('window.title').value; -- GitLab