From 35364193e3d24d47a8c2d970f70f696f2247e3bb Mon Sep 17 00:00:00 2001
From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>
Date: Tue, 4 Mar 2025 23:26:05 +1100
Subject: launcher: math mode

---
 src/modules/launcher/index.tsx | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

(limited to 'src/modules/launcher/index.tsx')

diff --git a/src/modules/launcher/index.tsx b/src/modules/launcher/index.tsx
index 2821050..8287187 100644
--- a/src/modules/launcher/index.tsx
+++ b/src/modules/launcher/index.tsx
@@ -121,9 +121,10 @@ export default class Launcher extends PopupWindow {
         this.hook(entry, "changed", () =>
             (isAction(entry.get_text()) ? actions : content[mode.get()]).updateContent(entry.get_text())
         );
-        this.hook(entry, "activate", () =>
-            (isAction(entry.get_text()) ? actions : content[mode.get()]).handleActivate(entry.get_text())
-        );
+        this.hook(entry, "activate", () => {
+            (isAction(entry.get_text()) ? actions : content[mode.get()]).handleActivate(entry.get_text());
+            entry.set_text(""); // Clear search on activate
+        });
 
         // Clear search on hide if not in math mode or creating a todo
         this.connect("hide", () => mode.get() !== "math" && !entry.text.startsWith(">todo") && entry.set_text(""));
-- 
cgit v1.2.3-freya

