Skip to content

Commit 3cbe3b0

Browse files
committed
add filename to when custom label is present
1 parent f32af86 commit 3cbe3b0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/vs/workbench/contrib/search/browser/anythingQuickAccess.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -954,8 +954,9 @@ export class AnythingQuickAccessProvider extends PickerQuickAccessProvider<IAnyt
954954
icon = resourceOrEditor.getIcon();
955955
} else {
956956
resource = URI.isUri(resourceOrEditor) ? resourceOrEditor : resourceOrEditor.resource;
957-
label = this.customEditorLabelService.getName(resource) || basenameOrAuthority(resource);
958-
description = this.labelService.getUriLabel(dirname(resource), { relative: true });
957+
const customLabel = this.customEditorLabelService.getName(resource);
958+
label = customLabel || basenameOrAuthority(resource);
959+
description = this.labelService.getUriLabel(!!customLabel ? resource : dirname(resource), { relative: true });
959960
isDirty = this.workingCopyService.isDirty(resource) && !this.filesConfigurationService.hasShortAutoSaveDelay(resource);
960961
extraClasses = [];
961962
}

0 commit comments

Comments
 (0)