File tree 1 file changed +5
-3
lines changed
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 {
202
202
203
203
constructor ( ) {
204
204
this . commands = [
205
- vscode . commands . registerCommand ( "PowerShell.RunSelection" , ( ) => {
205
+ vscode . commands . registerCommand ( "PowerShell.RunSelection" , async ( ) => {
206
206
if ( this . languageClient === undefined ) {
207
207
// TODO: Log error message
208
208
return ;
@@ -224,8 +224,10 @@ export class ConsoleFeature implements IFeature {
224
224
expression : editor . document . getText ( selectionRange ) ,
225
225
} ) ;
226
226
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" ) ;
229
231
} ) ,
230
232
] ;
231
233
}
You can’t perform that action at this time.
0 commit comments