mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
Workspace folder picker entry descriptions are suboptimal for some filesystems (fix #183418) (#184018)
This commit is contained in:
parent
c3867859cf
commit
fbbcd0ea14
|
@ -1721,14 +1721,19 @@ async function pickTerminalCwd(accessor: ServicesAccessor, cancel?: Cancellation
|
|||
}
|
||||
|
||||
type Item = IQuickPickItem & { pair: WorkspaceFolderCwdPair };
|
||||
const folderPicks: Item[] = shrinkedPairs.map(pair => ({
|
||||
label: pair.folder.name,
|
||||
description: pair.isOverridden
|
||||
const folderPicks: Item[] = shrinkedPairs.map(pair => {
|
||||
const label = pair.folder.name;
|
||||
const description = pair.isOverridden
|
||||
? localize('workbench.action.terminal.overriddenCwdDescription', "(Overriden) {0}", labelService.getUriLabel(pair.cwd, { relative: !pair.isAbsolute }))
|
||||
: labelService.getUriLabel(dirname(pair.cwd), { relative: true }),
|
||||
pair: pair,
|
||||
iconClasses: getIconClasses(modelService, languageService, pair.cwd, FileKind.ROOT_FOLDER)
|
||||
}));
|
||||
: labelService.getUriLabel(dirname(pair.cwd), { relative: true });
|
||||
|
||||
return {
|
||||
label,
|
||||
description: description !== label ? description : undefined,
|
||||
pair: pair,
|
||||
iconClasses: getIconClasses(modelService, languageService, pair.cwd, FileKind.ROOT_FOLDER)
|
||||
};
|
||||
});
|
||||
const options: IPickOptions<Item> = {
|
||||
placeHolder: localize('workbench.action.terminal.newWorkspacePlaceholder', "Select current working directory for new terminal"),
|
||||
matchOnDescription: true,
|
||||
|
|
Loading…
Reference in a new issue