mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
* Prevent duplicate text in workspace folder picker when path has no parent (fix #183418) * Instead, blank description when it matched label * Set `description` undefined when same as `label`
This commit is contained in:
parent
2dfb838f49
commit
fb335eb1a0
|
@ -117,9 +117,12 @@ CommandsRegistry.registerCommand(PICK_WORKSPACE_FOLDER_COMMAND_ID, async functio
|
|||
}
|
||||
|
||||
const folderPicks: IQuickPickItem[] = folders.map(folder => {
|
||||
const label = folder.name;
|
||||
const description = labelService.getUriLabel(dirname(folder.uri), { relative: true });
|
||||
|
||||
return {
|
||||
label: folder.name,
|
||||
description: labelService.getUriLabel(dirname(folder.uri), { relative: true }),
|
||||
label,
|
||||
description: description !== label ? description : undefined, // https://github.com/microsoft/vscode/issues/183418
|
||||
folder,
|
||||
iconClasses: getIconClasses(modelService, languageService, folder.uri, FileKind.ROOT_FOLDER)
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue