Skip to content

Commit

Permalink
Fix #12 - Opening plugins from command palette
Browse files Browse the repository at this point in the history
  • Loading branch information
pjeby committed Jun 5, 2023
1 parent 1195592 commit a360be9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"id": "hotkey-helper",
"name": "Hotkey Helper",
"version": "0.3.17",
"minAppVersion": "0.15.9",
"version": "0.3.18",
"minAppVersion": "1.2.8",
"description": "Easily see and access any plugin's settings or hotkey assignments (and conflicts) from the Community Plugins tab",
"author": "PJ Eby",
"authorUrl": "https://github.com/pjeby"
Expand Down
2 changes: 1 addition & 1 deletion ophidian.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Builder from "@ophidian/build";

new Builder("src/hotkey-helper.ts")
.withCss()
.withSass()
.withInstall()
.build();

5 changes: 3 additions & 2 deletions src/hotkey-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
import {around, serialize} from "monkey-around";
import {defer, modalSelect, onElement} from "@ophidian/core";
import "./obsidian-internals";
import "../styles.css";

interface OldPluginViewer extends Modal { // pre 1.0
autoopen?: string
Expand Down Expand Up @@ -299,7 +300,7 @@ export default class HotkeyHelper extends Plugin {
tmp.settingEl.detach();
}
if (tabId === "community-plugins") {
searchEl.inputEl.addEventListener("keyup", e => {
searchEl.inputEl.addEventListener("keydown", e => {
if (e.keyCode === 13 && !Keymap.getModifiers(e)) {
this.gotoPlugin();
return false;
Expand Down Expand Up @@ -535,7 +536,7 @@ export default class HotkeyHelper extends Plugin {
this.currentViewer?.close(); // close the plugin browser if open
settingsAreOpen() || app.setting.open();
if (id) {
app.setting.openTabById(id);
if (app.setting.activeTab?.id !== id) app.setting.openTabById(id);
return app.setting.activeTab?.id === id ? app.setting.activeTab : false
}
}
Expand Down
1 change: 1 addition & 0 deletions versions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"0.3.18": "1.2.8",
"0.3.17": "1.1.16",
"0.3.16": "0.15.9",
"0.3.11": "0.13.19",
Expand Down

0 comments on commit a360be9

Please sign in to comment.