Skip to content

Scroll the terminal to bottom for F8 execution #1407

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 10, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/features/Console.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ export class ConsoleFeature implements IFeature {

constructor() {
this.commands = [
vscode.commands.registerCommand("PowerShell.RunSelection", () => {
vscode.commands.registerCommand("PowerShell.RunSelection", async () => {
if (this.languageClient === undefined) {
// TODO: Log error message
return;
Expand All @@ -224,8 +224,10 @@ export class ConsoleFeature implements IFeature {
expression: editor.document.getText(selectionRange),
});

// Show the integrated console if it isn't already visible
vscode.commands.executeCommand("PowerShell.ShowSessionConsole", true);
// Show the integrated console if it isn't already visible and
// scroll terminal to bottom so new output is visible
await vscode.commands.executeCommand("PowerShell.ShowSessionConsole", true);
await vscode.commands.executeCommand("workbench.action.terminal.scrollToBottom");
}),
];
}
Expand Down