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