Skip to content

Commit

Permalink
fix conflicts (#1619)
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerLeonhardt authored Feb 8, 2019
1 parent d31600e commit f186c60
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"publisher": "ms-vscode",
"description": "Develop PowerShell scripts in Visual Studio Code!",
"engines": {
"vscode": "^1.25.0"
"vscode": "^1.29.0"
},
"license": "SEE LICENSE IN LICENSE.txt",
"homepage": "https://github.com/PowerShell/vscode-powershell/blob/master/README.md",
Expand Down Expand Up @@ -51,8 +51,8 @@
"sinon": "^7.2.3",
"tslint": "~5.11.0",
"typescript": "~3.2.1",
"vsce": "~1.46.0",
"vscode": "~1.1.22"
"vsce": "~1.53.2",
"vscode": "~1.1.24"
},
"extensionDependencies": [
"vscode.powershell"
Expand Down
14 changes: 14 additions & 0 deletions src/features/Console.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { LanguageClient, NotificationType, RequestType } from "vscode-languagecl
import { ICheckboxQuickPickItem, showCheckboxQuickPick } from "../controls/checkboxQuickPick";
import { IFeature } from "../feature";
import { Logger } from "../logging";
import Settings = require("../settings");

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

if (vscode.window.activeTerminal.name !== "PowerShell Integrated Console") {
this.log.write("PSIC is not active terminal. Running in active terminal using 'runSelectedText'");
await vscode.commands.executeCommand("workbench.action.terminal.runSelectedText");

// We need to honor the focusConsoleOnExecute setting here too. However, the boolean that `show`
// takes is called `preserveFocus` which when `true` the terminal will not take focus.
// This is the inverse of focusConsoleOnExecute so we have to inverse the boolean.
vscode.window.activeTerminal.show(!Settings.load().integratedConsole.focusConsoleOnExecute);
await vscode.commands.executeCommand("workbench.action.terminal.scrollToBottom");

return;
}

const editor = vscode.window.activeTextEditor;
let selectionRange: vscode.Range;

Expand Down

0 comments on commit f186c60

Please sign in to comment.