From ee9dafcf74c85a28fa1d00f1c3fff51bdabddaf8 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 17 Apr 2019 11:50:10 +0200 Subject: [PATCH] notifications - tweak title --- src/vs/workbench/common/notifications.ts | 2 +- src/vs/workbench/test/common/notifications.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/common/notifications.ts b/src/vs/workbench/common/notifications.ts index 5c287df4307..c7ddc318215 100644 --- a/src/vs/workbench/common/notifications.ts +++ b/src/vs/workbench/common/notifications.ts @@ -400,7 +400,7 @@ export class NotificationViewItem extends Disposable implements INotificationVie if (title && title.length > 0) { massagedTitle = title; } else if (startsWith(href, 'command:')) { - massagedTitle = localize('executeCommand', "Click to execute command '{0}'", href); + massagedTitle = localize('executeCommand', "Click to execute command '{0}'", href.substr('command:'.length)); } else { massagedTitle = href; } diff --git a/src/vs/workbench/test/common/notifications.test.ts b/src/vs/workbench/test/common/notifications.test.ts index fa74bee2823..678c6aab20b 100644 --- a/src/vs/workbench/test/common/notifications.test.ts +++ b/src/vs/workbench/test/common/notifications.test.ts @@ -124,7 +124,7 @@ suite('Notifications', () => { assert.equal(links[2].name, 'Link 3'); assert.equal(links[2].href, 'command:without.title'); - assert.equal(links[2].title, 'Click to execute command \'command:without.title\''); + assert.equal(links[2].title, 'Click to execute command \'without.title\''); assert.equal(links[2].length, '[Link 3](command:without.title)'.length); assert.equal(links[2].offset, 'Unable to [Link 1](http://link1.com) open [Link 2](command:open.me "Open This") and '.length); });