Skip to content

Commit

Permalink
Clear previous output when running in terminal (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffreyCA authored and formulahendry committed Jul 31, 2017
1 parent 5bd82e4 commit 49de48a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/codeManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,14 @@ export class CodeManager {
this._appInsightsClient.sendEvent(executor);
let command = this.getFinalCommandToRunCodeFile(executor, appendFile);
command = this.changeCommandForBashOnWindows(command);
this._terminal.sendText(command);
if (this._config.get<boolean>('clearPreviousOutput')) {
vscode.commands.executeCommand('workbench.action.terminal.clear').then(() => {
this._terminal.sendText(command);
});
}
else {
this._terminal.sendText(command);
}
}

private executeCommandInOutputChannel(executor: string, appendFile: boolean = true) {
Expand Down

0 comments on commit 49de48a

Please sign in to comment.