aboutsummaryrefslogtreecommitdiff
path: root/code/src/extension.ts
diff options
context:
space:
mode:
Diffstat (limited to 'code/src/extension.ts')
-rw-r--r--code/src/extension.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/code/src/extension.ts b/code/src/extension.ts
index 7acde195d..554ac8af3 100644
--- a/code/src/extension.ts
+++ b/code/src/extension.ts
@@ -100,11 +100,14 @@ export function activate(context: vscode.ExtensionContext) {
100 items.push(prevRunnable) 100 items.push(prevRunnable)
101 } 101 }
102 for (let r of runnables) { 102 for (let r of runnables) {
103 if (prevRunnable && JSON.stringify(prevRunnable.runnable) == JSON.stringify(r)) {
104 continue
105 }
103 items.push(new RunnableQuickPick(r)) 106 items.push(new RunnableQuickPick(r))
104 } 107 }
105 let item = await vscode.window.showQuickPick(items) 108 let item = await vscode.window.showQuickPick(items)
106 if (item) { 109 if (item) {
107 item.detail = "last" 110 item.detail = "rerun"
108 prevRunnable = item 111 prevRunnable = item
109 let task = createTask(item.runnable) 112 let task = createTask(item.runnable)
110 return await vscode.tasks.executeTask(task) 113 return await vscode.tasks.executeTask(task)
@@ -351,7 +354,7 @@ function createTask(spec: Runnable): vscode.Task {
351 cwd: '.', 354 cwd: '.',
352 env: definition.env, 355 env: definition.env,
353 }; 356 };
354 let exec = new vscode.ShellExecution(execCmd, execOption); 357 let exec = new vscode.ShellExecution(`clear; ${execCmd}`, execOption);
355 358
356 let f = vscode.workspace.workspaceFolders![0] 359 let f = vscode.workspace.workspaceFolders![0]
357 let t = new vscode.Task(definition, f, definition.label, TASK_SOURCE, exec, ['$rustc']); 360 let t = new vscode.Task(definition, f, definition.label, TASK_SOURCE, exec, ['$rustc']);