diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index b06017ea1..da50a87af 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -67,6 +67,7 @@ Fixed - Worked around a segfault when opening a URL after a QtWebEngine renderer process crash - Using :undo or :tab-clone with a view-source:// or chrome:// tab is now prevented, as it segfaults - `:navigate prev/next` now detects `rel` attributes on `` elements +- Fixed a crash when hinting with target `userscript` and spawning a non-existing script v0.9.1 ------ diff --git a/qutebrowser/browser/hints.py b/qutebrowser/browser/hints.py index 308f686b0..144b13f76 100644 --- a/qutebrowser/browser/hints.py +++ b/qutebrowser/browser/hints.py @@ -316,7 +316,7 @@ class HintActions: try: userscripts.run_async(context.tab, cmd, *args, win_id=self._win_id, env=env) - except userscripts.UnsupportedError as e: + except userscripts.Error as e: raise HintingError(str(e)) def spawn(self, url, context): diff --git a/tests/end2end/features/hints.feature b/tests/end2end/features/hints.feature index 516ca0979..772ffec55 100644 --- a/tests/end2end/features/hints.feature +++ b/tests/end2end/features/hints.feature @@ -81,6 +81,11 @@ Feature: Using hints And I hint with args "all userscript (testdata)/userscripts/echo_hint_text" and follow a Then the message "Follow me!" should be shown + Scenario: Using :hint userscript with a script which doesn't exist + When I open data/hints/html/simple.html + And I hint with args "all userscript (testdata)/does_not_exist" and follow a + Then the error "Userscript '*' not found" should be shown + Scenario: Yanking to clipboard When I run :debug-set-fake-clipboard And I open data/hints/html/simple.html