From 2a0e503644e73336f9e3f37ee4c9d462b150fbb0 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 18 Aug 2016 17:46:12 +0200 Subject: [PATCH] QtWebEngine: Don't raise CommandError with no hint --- qutebrowser/browser/hints.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qutebrowser/browser/hints.py b/qutebrowser/browser/hints.py index 59887a1ec..538f91928 100644 --- a/qutebrowser/browser/hints.py +++ b/qutebrowser/browser/hints.py @@ -567,7 +567,8 @@ class HintManager(QObject): filterfunc = webelem.FILTERS.get(self._context.group, lambda e: True) elems = [e for e in elems if filterfunc(e)] if not elems: - raise cmdexc.CommandError("No elements found.") + message.error(self._win_id, "No elements found.", immediately=True) + return strings = self._hint_strings(elems) log.hints.debug("hints: {}".format(', '.join(strings)))