Files
vscode-gitlens/src/commands/showLastQuickPick.ts
Eric Amodio 8b0748608d Renames commands/commands to commands/common
Renames quickpicks/quickpicks to quickpicks/common
Moves git quick picks into common and other quick pick files
2017-03-28 16:19:57 -04:00

24 lines
701 B
TypeScript

'use strict';
import { commands, window } from 'vscode';
import { Command, Commands, getLastCommand } from './common';
import { Logger } from '../logger';
export class ShowLastQuickPickCommand extends Command {
constructor() {
super(Commands.ShowLastQuickPick);
}
async execute() {
const command = getLastCommand();
if (!command) return undefined;
try {
return commands.executeCommand(command.command, ...command.args);
}
catch (ex) {
Logger.error(ex, 'ShowLastQuickPickCommand');
return window.showErrorMessage(`Unable to show last quick pick. See output channel for more details`);
}
}
}