Merge from vscode 3a6dcb42008d509900b3a3b2d695564eeb4dbdac (#5098)

This commit is contained in:
Alan Ren
2019-04-17 23:38:44 -07:00
committed by GitHub
parent 1fec26c6b3
commit b852f032d3
63 changed files with 676 additions and 413 deletions

View File

@@ -145,12 +145,13 @@ export class NoTabsTitleControl extends TitleControl {
this.redraw();
}
updateEditorLabel(editor?: IEditorInput): void {
if (!editor) {
editor = withNullAsUndefined(this.group.activeEditor);
}
if (editor) {
this.ifEditorIsActive(editor, () => this.redraw());
updateEditorLabel(editor: IEditorInput): void {
this.ifEditorIsActive(editor, () => this.redraw());
}
updateEditorLabels(): void {
if (this.group.activeEditor) {
this.updateEditorLabel(this.group.activeEditor); // we only have the active one to update
}
}

View File

@@ -371,6 +371,12 @@ export class TabsTitleControl extends TitleControl {
updateEditorLabel(editor: IEditorInput): void {
// Update all labels to account for changes to tab labels
this.updateEditorLabels();
}
updateEditorLabels(): void {
// A change to a label requires to recompute all labels
this.computeTabLabels();

View File

@@ -93,7 +93,7 @@ export abstract class TitleControl extends Themable {
private registerListeners(): void {
this._register(this.extensionService.onDidRegisterExtensions(() => this.updateEditorActionsToolbar()));
this._register(this.labelService.onDidChangeFormatters(() => this.updateEditorLabel()));
this._register(this.labelService.onDidChangeFormatters(() => this.updateEditorLabels()));
}
protected abstract create(parent: HTMLElement): void;
@@ -343,7 +343,9 @@ export abstract class TitleControl extends Themable {
abstract setActive(isActive: boolean): void;
abstract updateEditorLabel(editor?: IEditorInput): void;
abstract updateEditorLabel(editor: IEditorInput): void;
abstract updateEditorLabels(): void;
abstract updateEditorDirty(editor: IEditorInput): void;

View File

@@ -153,7 +153,7 @@ class NotificationMessageRenderer {
const anchor = document.createElement('a');
anchor.textContent = link.name;
anchor.title = link.href;
anchor.title = link.title;
anchor.href = link.href;
if (actionHandler) {