Skip to content

Commit 69d84f2

Browse files
authored
can not show ssh tag after VS code update from 1.78.2 (microsoft#201125)
1 parent cbd4175 commit 69d84f2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/vs/base/common/labels.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -436,15 +436,17 @@ export function unmnemonicLabel(label: string): string {
436436
}
437437

438438
/**
439-
* Splits a recent label in name and parent path, supporting both '/' and '\' and workspace suffixes
439+
* Splits a recent label in name and parent path, supporting both '/' and '\' and workspace suffixes.
440+
* If the location is remote, the remote name is included in the name part.
440441
*/
441-
export function splitRecentLabel(recentLabel: string) {
442+
export function splitRecentLabel(recentLabel: string): { name: string; parentPath: string } {
442443
if (recentLabel.endsWith(']')) {
443444
// label with workspace suffix
444445
const lastIndexOfSquareBracket = recentLabel.lastIndexOf(' [', recentLabel.length - 2);
445446
if (lastIndexOfSquareBracket !== -1) {
446447
const split = splitName(recentLabel.substring(0, lastIndexOfSquareBracket));
447-
return { name: split.name, parentPath: split.parentPath + recentLabel.substring(lastIndexOfSquareBracket) };
448+
const remoteNameWithSpace = recentLabel.substring(lastIndexOfSquareBracket);
449+
return { name: split.name + remoteNameWithSpace, parentPath: split.parentPath };
448450
}
449451
}
450452
return splitName(recentLabel);

0 commit comments

Comments
 (0)