Skip to content

Commit 2e12b8e

Browse files
authored
Scroll the terminal to bottom for F8 executionPartial fix #1257 (#1407)
1 parent 5a62292 commit 2e12b8e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/features/Console.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ export class ConsoleFeature implements IFeature {
202202

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

227-
// Show the integrated console if it isn't already visible
228-
vscode.commands.executeCommand("PowerShell.ShowSessionConsole", true);
227+
// Show the integrated console if it isn't already visible and
228+
// scroll terminal to bottom so new output is visible
229+
await vscode.commands.executeCommand("PowerShell.ShowSessionConsole", true);
230+
await vscode.commands.executeCommand("workbench.action.terminal.scrollToBottom");
229231
}),
230232
];
231233
}

0 commit comments

Comments
 (0)