Hide description in narrow tab view

This commit is contained in:
Daniel Imms 2021-04-23 17:31:35 -07:00
parent 7aab1c1714
commit 42851ddb80

View file

@ -227,9 +227,7 @@ class TerminalTabsRenderer implements ITreeRenderer<ITerminalInstance, never, IT
}
} else {
this.fillActionBar(instance, template);
// Remove "Task - " from only tabs to give more horizontal space as it's obvious from
// the tab icon
label = `${prefix}$(${instance.icon?.id}) ${instance.title.replace(/^Task - /, '')}`;
label = `${prefix}$(${instance.icon?.id}) ${instance.title}`;
}
if (!template.elementDispoables) {
@ -245,7 +243,7 @@ class TerminalTabsRenderer implements ITreeRenderer<ITerminalInstance, never, IT
template.label.setResource({
resource: instance.resource,
name: label,
description: instance.shellLaunchConfig.description
description: hasText ? instance.shellLaunchConfig.description : undefined
}, {
fileDecorations: {
colors: true,