mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-29 04:53:33 +01:00
@@ -43,6 +43,7 @@ export interface LabelRules {
|
||||
separator: '/' | '\\' | '';
|
||||
tildify?: boolean;
|
||||
normalizeDriveLetter?: boolean;
|
||||
authorityPrefix?: string;
|
||||
};
|
||||
workspace?: {
|
||||
suffix: string;
|
||||
@@ -168,6 +169,9 @@ export class LabelService implements ILabelService {
|
||||
if (formatter.uri.tildify && !forceNoTildify) {
|
||||
label = tildify(label, this.environmentService.userHome);
|
||||
}
|
||||
if (formatter.uri.authorityPrefix && resource.authority) {
|
||||
label = formatter.uri.authorityPrefix + label;
|
||||
}
|
||||
|
||||
return label.replace(sepRegexp, formatter.uri.separator);
|
||||
}
|
||||
|
||||
@@ -63,7 +63,8 @@ class FileUriLabelContribution implements IWorkbenchContribution {
|
||||
label: '${authority}${path}',
|
||||
separator: nativeSep,
|
||||
tildify: !platform.isWindows,
|
||||
normalizeDriveLetter: platform.isWindows
|
||||
normalizeDriveLetter: platform.isWindows,
|
||||
authorityPrefix: nativeSep + nativeSep
|
||||
},
|
||||
workspace: {
|
||||
suffix: ''
|
||||
|
||||
Reference in New Issue
Block a user