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.
This commit is contained in:
sankalp committed 2026-07-15 10:49:43 +05:45
1 parent 9eb62d7ea3
commit 4503130be3
1 file changed
+4 -3
+4 -3
View File
@@ -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: