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:
1 file changed
+4
-3
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user