File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments