diff options
author | Aleksey Kladov <[email protected]> | 2018-08-27 21:12:45 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-08-27 21:12:45 +0100 |
commit | 010075be6a6b866f6a3f981a61ad2e746cb44f00 (patch) | |
tree | bb716aa4ae2fd6f6b960a46e5668e47adf3bfff7 /code | |
parent | 422efe59afe333a8371afe6f9fb45f159a6fb07f (diff) |
even better tun
Diffstat (limited to 'code')
-rw-r--r-- | code/src/extension.ts | 7 |
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']); |