Skip to content

Commit

Permalink
Merge branch 'release/v1.9.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed Oct 29, 2019
2 parents 7f36ade + d97775f commit 0bfc8a5
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Release Notes

# 1.9.3 (2019-10-29)

- Handle "openTextDocument" in VSCode from upcoming PIO Home 3.0 and Project Inspect
- Use single PIO Home Server instance per multiple windows/sessions

# 1.9.2 (2019-10-20)

- Fixed an issue with broken PlatformIO Core installation
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "platformio-ide",
"version": "1.9.2",
"version": "1.9.3",
"publisher": "platformio",
"engines": {
"vscode": "^1.24.0"
Expand Down Expand Up @@ -604,7 +604,7 @@
},
"dependencies": {
"fs-plus": "^3.1.1",
"platformio-node-helpers": "^5.1.2",
"platformio-node-helpers": "^5.2.0",
"platformio-vscode-debug": "^1.2.11"
},
"extensionDependencies": [
Expand Down
15 changes: 14 additions & 1 deletion src/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export default class PIOHome {
this._lastStartUrl = startUrl;
const params = await pioNodeHelpers.home.ensureServerStarted({
port: extension.getSetting('pioHomeServerHttpPort'),
onIDECommand: (command, params) => {
onIDECommand: async (command, params) => {
if (command === 'open_project') {
this.disposePanel();
if (vscode.workspace.workspaceFolders) {
Expand All @@ -108,6 +108,19 @@ export default class PIOHome {
);
}
vscode.commands.executeCommand('workbench.view.explorer');
} else if (command === 'open_text_document') {
const editor = await vscode.window.showTextDocument(
vscode.Uri.file(params.path)
);
const gotoPosition = new vscode.Position(
(params.line || 1) - 1,
(params.column || 1) - 1
);
editor.selection = new vscode.Selection(gotoPosition, gotoPosition);
editor.revealRange(
new vscode.Range(gotoPosition, gotoPosition),
vscode.TextEditorRevealType.InCenter
);
}
}
});
Expand Down

0 comments on commit 0bfc8a5

Please sign in to comment.