fix(src/window/spotlight): add error handling around action invocation

Prevent crashes when result.action() raises exceptions and log warnings.
This commit is contained in:
sankalp committed 2026-07-15 11:30:23 +05:45
1 parent 211a428cca
commit e6c471a9f8
1 file changed
+5 -2
+5 -2
View File
@@ -530,8 +530,11 @@ class Spotlight(Box):
)
def _activate_result(self, result: SearchResult):
if result.action:
result.action()
try:
if result.action:
result.action()
except Exception as e:
logger.warning(f"[spotlight] result.action() failed: {e}")
self.launched()
def _activate_result_by_id(self, result_id: str):