Adds show last quick pick command

This commit is contained in:
Eric Amodio
2017-03-20 12:05:45 -04:00
parent d53caa2137
commit a5d1d74d7b
10 changed files with 101 additions and 35 deletions

View File

@@ -0,0 +1,24 @@
'use strict';
import { commands, window } from 'vscode';
import { Command, Commands, getLastCommand } from './commands';
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('[GitLens.ShowLastQuickPickCommand]', ex);
return window.showErrorMessage(`Unable to show last quick pick. See output channel for more details`);
}
}
}