Skip to content

Commit

Permalink
Merge pull request #1125 from microsoft/bobbrow/clearTerminal
Browse files Browse the repository at this point in the history
clear the terminal for compile active file
  • Loading branch information
bobbrow authored Mar 19, 2020
2 parents d2d42f2 + 208204a commit ccec317
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/drivers/driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,13 @@ export abstract class CMakeDriver implements vscode.Disposable {
const env = this.getEffectiveSubprocessEnvironment();
const key = `${cmd.directory}${JSON.stringify(env)}`;
let existing = this._compileTerms.get(key);
const shellPath = process.platform === 'win32' ? 'cmd.exe' : undefined;
if (existing && this.config.clearOutputBeforeBuild) {
this._compileTerms.delete(key);
existing.dispose();
existing = undefined;
}
if (!existing) {
const shellPath = process.platform === 'win32' ? 'cmd.exe' : undefined;
const term = vscode.window.createTerminal({
name: localize('file.compilation', 'File Compilation'),
cwd: cmd.directory,
Expand Down

0 comments on commit ccec317

Please sign in to comment.