Skip to content

Commit daa6664

Browse files
authored
Merge pull request #260896 from microsoft/tyriar/255864
Apply path separator normalization to git branches
2 parents 5ed1816 + 43a4acc commit daa6664

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/vs/workbench/contrib/terminalContrib/suggest/browser/terminalCompletionItem.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,16 @@ export class TerminalCompletionItem extends SimpleCompletionItem {
122122
this.labelLowExcludeFileExt = this.labelLow;
123123
this.labelLowNormalizedPath = this.labelLow;
124124

125-
if (isFile(completion)) {
125+
// HACK: Treat branch as a path separator, otherwise they get filtered out. Hard code the
126+
// documentation for now, but this would be better to come in through a `kind`
127+
// See https://github.com/microsoft/vscode/issues/255864
128+
if (isFile(completion) || completion.documentation === 'Branch') {
126129
if (isWindows) {
127130
this.labelLow = this.labelLow.replaceAll('/', '\\');
128131
}
132+
}
133+
134+
if (isFile(completion)) {
129135
// Don't include dotfiles as extensions when sorting
130136
const extIndex = this.labelLow.lastIndexOf('.');
131137
if (extIndex > 0) {

0 commit comments

Comments
 (0)