From 4503130be3011a1c18d8d3cbf8af5a48f4b52884 Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Wed, 15 Jul 2026 10:49:43 +0545 Subject: [PATCH] fix(spotlight): activate first result before on_submit in entry accept _on_entry_accept checked _active_plugin_entry before _current_results. Keyword plugins (emoji, clipboard) are always active when prefix typed, so on_submit (no-op base) swallowed Enter before result.action() fired. Now results are checked first. on_submit only as fallback when no results. --- src/window/spotlight/main.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/window/spotlight/main.py b/src/window/spotlight/main.py index 7aea315..91f0af7 100644 --- a/src/window/spotlight/main.py +++ b/src/window/spotlight/main.py @@ -633,6 +633,10 @@ class Spotlight(Box): widget.clicked() return + if self._current_results: + self._activate_result(self._current_results[0]) + return + if self._active_plugin_entry: inst = self._active_plugin_entry.instance if inst: @@ -640,9 +644,6 @@ class Spotlight(Box): entry.set_text("") return - if self._current_results: - self._activate_result(self._current_results[0]) - # External commands def handle_external(self, command: str, text: str = "") -> bool: if command == "deep_reload" and text: