Skip to content

Commit

Permalink
Fix #217: Output window should appear when F8 is pressed.
Browse files Browse the repository at this point in the history
  • Loading branch information
daviwil committed Dec 9, 2016
1 parent 657446d commit f596896
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/features/Console.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ export class ConsoleFeature implements IFeature {
this.languageClient.sendRequest(EvaluateRequest.type, {
expression: editor.document.getText(selectionRange)
});

// Show the output window if it isn't already visible
this.consoleChannel.show(vscode.ViewColumn.Three);
});

this.consoleChannel = vscode.window.createOutputChannel("PowerShell Output");
Expand All @@ -189,14 +192,6 @@ export class ConsoleFeature implements IFeature {
promptDetails => showInputPrompt(promptDetails, this.languageClient));

this.languageClient.onNotification(OutputNotification.type, (output) => {
var outputEditorExist = vscode.window.visibleTextEditors.some((editor) => {
return editor.document.languageId == 'Log'
});

if (!outputEditorExist) {
this.consoleChannel.show(vscode.ViewColumn.Three);
}

this.consoleChannel.append(output.output);
});
}
Expand Down

0 comments on commit f596896

Please sign in to comment.