From e86f9f466f461987d59f9345752f0932616716a3 Mon Sep 17 00:00:00 2001 From: RohitKushvaha01 Date: Sun, 11 Jan 2026 11:43:43 +0530 Subject: [PATCH 1/2] fix: memory leak when toggling search panel --- src/handlers/quickTools.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/handlers/quickTools.js b/src/handlers/quickTools.js index 5a35eb2c5..003e0a914 100644 --- a/src/handlers/quickTools.js +++ b/src/handlers/quickTools.js @@ -76,8 +76,13 @@ appSettings.on("update:quicktoolsItems:after", () => { }, 100); }); + + +let historyNavigationInitialized = false; // Initialize history navigation function setupHistoryNavigation() { + if (historyNavigationInitialized) return; + historyNavigationInitialized = true; const { $searchInput, $replaceInput } = quickTools; // Search input history navigation @@ -87,7 +92,7 @@ function setupHistoryNavigation() { e.preventDefault(); const { editor, activeFile } = editorManager; editor.focus(); - toggleSearch(); + actionStack.get("search-bar")?.action(); } else if (e.key === "ArrowUp") { e.preventDefault(); const newValue = searchHistory.navigateSearchUp($searchInput.el.value); From e345c7c0637cac26244bf6d4f5229aa2b4437353 Mon Sep 17 00:00:00 2001 From: RohitKushvaha01 Date: Sun, 11 Jan 2026 11:45:10 +0530 Subject: [PATCH 2/2] format --- src/handlers/quickTools.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/handlers/quickTools.js b/src/handlers/quickTools.js index 003e0a914..534a6ce41 100644 --- a/src/handlers/quickTools.js +++ b/src/handlers/quickTools.js @@ -76,8 +76,6 @@ appSettings.on("update:quicktoolsItems:after", () => { }, 100); }); - - let historyNavigationInitialized = false; // Initialize history navigation function setupHistoryNavigation() {