Call out current session in go to recent dir

Part of #143318
This commit is contained in:
Daniel Imms 2022-02-18 04:15:35 -08:00
parent 0941c02227
commit f96b8d9003

View file

@ -846,12 +846,14 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
}
} else {
const cwds = this.capabilities.get(TerminalCapability.CwdDetection)?.cwds || [];
for (const label of cwds) {
items.push({ label });
if (cwds && cwds.length > 0) {
for (const label of cwds) {
items.push({ label });
}
items = items.reverse();
items.unshift({ type: 'separator', label: 'current session' });
}
items = items.reverse();
// Gather previous session history
const history = this._instantiationService.invokeFunction(getDirectoryHistory);
const previousSessionItems: IQuickPickItem[] = [];