Skip to content

Commit

Permalink
Fix #239
Browse files Browse the repository at this point in the history
  • Loading branch information
lramos15 committed Jun 20, 2022
1 parent 8838c4f commit 1614fc3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"license": "MIT",
"engines": {
"vscode": "^1.63.0"
"vscode": "^1.68.0"
},
"categories": [
"Other"
Expand Down Expand Up @@ -155,7 +155,7 @@
"@types/node": "^17.0.8",
"@types/react": "^17.0.38",
"@types/react-dom": "^17.0.11",
"@types/vscode": "^1.63.1",
"@types/vscode": "^1.68.0",
"@typescript-eslint/eslint-plugin": "^5.9.1",
"@typescript-eslint/parser": "^5.9.1",
"@vscode/test-electron": "^2.0.3",
Expand Down
7 changes: 5 additions & 2 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ export function activate(context: vscode.ExtensionContext): void {
const configValues = readConfigFromPackageJson(extensionID);
context.subscriptions.push(vscode.window.registerWebviewViewProvider(DataInspectorView.viewType, dataInspectorProvider));
telemetryReporter = new TelemetryReporter(extensionID, configValues.version, configValues.aiKey);
const openWithCommand = vscode.commands.registerTextEditorCommand("hexEditor.openFile", (textEditor: vscode.TextEditor) => {
vscode.commands.executeCommand("vscode.openWith", textEditor.document.uri, "hexEditor.hexedit");
const openWithCommand = vscode.commands.registerCommand("hexEditor.openFile", () => {
const activeTabInput = vscode.window.tabGroups.activeTabGroup.activeTab?.input as { [key: string]: any, uri: vscode.Uri | undefined };
if (activeTabInput.uri) {
vscode.commands.executeCommand("vscode.openWith", activeTabInput.uri, "hexEditor.hexedit");
}
});
const goToOffsetCommand = vscode.commands.registerCommand("hexEditor.goToOffset", () => {
if (HexEditorProvider.currentWebview) {
Expand Down

0 comments on commit 1614fc3

Please sign in to comment.