From 010075be6a6b866f6a3f981a61ad2e746cb44f00 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 27 Aug 2018 23:12:45 +0300 Subject: even better tun --- code/src/extension.ts | 7 +++++-- 1 file 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) { items.push(prevRunnable) } for (let r of runnables) { + if (prevRunnable && JSON.stringify(prevRunnable.runnable) == JSON.stringify(r)) { + continue + } items.push(new RunnableQuickPick(r)) } let item = await vscode.window.showQuickPick(items) if (item) { - item.detail = "last" + item.detail = "rerun" prevRunnable = item let task = createTask(item.runnable) return await vscode.tasks.executeTask(task) @@ -351,7 +354,7 @@ function createTask(spec: Runnable): vscode.Task { cwd: '.', env: definition.env, }; - let exec = new vscode.ShellExecution(execCmd, execOption); + let exec = new vscode.ShellExecution(`clear; ${execCmd}`, execOption); let f = vscode.workspace.workspaceFolders![0] let t = new vscode.Task(definition, f, definition.label, TASK_SOURCE, exec, ['$rustc']); -- cgit v1.2.3