Skip to content

Commit 4c781fb

Browse files
fix conflicts
1 parent 2e222d3 commit 4c781fb

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"publisher": "ms-vscode",
66
"description": "Develop PowerShell scripts in Visual Studio Code!",
77
"engines": {
8-
"vscode": "^1.25.0"
8+
"vscode": "^1.29.0"
99
},
1010
"license": "SEE LICENSE IN LICENSE.txt",
1111
"homepage": "https://github.com/PowerShell/vscode-powershell/blob/master/README.md",
@@ -46,8 +46,8 @@
4646
"mocha": "~4.0.1",
4747
"tslint": "~5.11.0",
4848
"typescript": "~3.2.1",
49-
"vsce": "~1.46.0",
50-
"vscode": "~1.1.22"
49+
"vsce": "~1.53.2",
50+
"vscode": "~1.1.24"
5151
},
5252
"extensionDependencies": [
5353
"vscode.powershell"

src/features/Console.ts

+14
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { LanguageClient, NotificationType, RequestType } from "vscode-languagecl
77
import { ICheckboxQuickPickItem, showCheckboxQuickPick } from "../controls/checkboxQuickPick";
88
import { IFeature } from "../feature";
99
import { Logger } from "../logging";
10+
import Settings = require("../settings");
1011

1112
export const EvaluateRequestType = new RequestType<IEvaluateRequestArguments, void, void, void>("evaluate");
1213
export const OutputNotificationType = new NotificationType<IOutputNotificationBody, void>("output");
@@ -210,6 +211,19 @@ export class ConsoleFeature implements IFeature {
210211
return;
211212
}
212213

214+
if (vscode.window.activeTerminal.name !== "PowerShell Integrated Console") {
215+
this.log.write("PSIC is not active terminal. Running in active terminal using 'runSelectedText'");
216+
await vscode.commands.executeCommand("workbench.action.terminal.runSelectedText");
217+
218+
// We need to honor the focusConsoleOnExecute setting here too. However, the boolean that `show`
219+
// takes is called `preserveFocus` which when `true` the terminal will not take focus.
220+
// This is the inverse of focusConsoleOnExecute so we have to inverse the boolean.
221+
vscode.window.activeTerminal.show(!Settings.load().integratedConsole.focusConsoleOnExecute);
222+
await vscode.commands.executeCommand("workbench.action.terminal.scrollToBottom");
223+
224+
return;
225+
}
226+
213227
const editor = vscode.window.activeTextEditor;
214228
let selectionRange: vscode.Range;
215229

0 commit comments

Comments
 (0)