Skip to content

Commit

Permalink
fix eclipse-theia#7888: specify when closure for Run Last Task ke…
Browse files Browse the repository at this point in the history
…ybinding

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
  • Loading branch information
akosyakov committed May 26, 2020
1 parent ca6b505 commit fa9259f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/task/src/browser/task-frontend-contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,11 @@ export class TaskFrontendContribution implements CommandContribution, MenuContri
registry.registerCommand(
TaskCommands.TASK_RUN_LAST,
{
isEnabled: () => !!this.taskService.getLastTask(),
execute: () => this.taskService.runLastTask()
execute: async () => {
if (!await this.taskService.runLastTask()) {
await this.quickOpenTask.open();
}
}
}
);
registry.registerCommand(
Expand Down Expand Up @@ -388,7 +391,8 @@ export class TaskFrontendContribution implements CommandContribution, MenuContri
registerKeybindings(keybindings: KeybindingRegistry): void {
keybindings.registerKeybinding({
command: TaskCommands.TASK_RUN_LAST.id,
keybinding: 'ctrlcmd+shift+k'
keybinding: 'ctrlcmd+shift+k',
when: '!textInputFocus || editorReadonly'
});
}

Expand Down

0 comments on commit fa9259f

Please sign in to comment.