Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/ui/debugNpmScript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ export async function debugNpmScript(inFolder?: vscode.WorkspaceFolder | string)
// directory name so the user knows where it's coming from.
const multiDir = scripts.some(s => s.directory !== scripts[0].directory);
const quickPick = vscode.window.createQuickPick<ScriptPickItem>();
// Keep the original order while filtering so directory separators stay attached to their
// groups; sorting by match would reorder across groups and drop them. (sortByLabel is
// proposed API microsoft/vscode#73904, safe at runtime — cast to avoid the dependency.)
(quickPick as { sortByLabel?: boolean }).sortByLabel = !multiDir;

let lastDir: string | undefined;
const items: ScriptPickItem[] = [];
Expand Down