diff --git a/qutebrowser/widgets/webview.py b/qutebrowser/widgets/webview.py index 20740f8d7..c252473bb 100644 --- a/qutebrowser/widgets/webview.py +++ b/qutebrowser/widgets/webview.py @@ -251,6 +251,8 @@ class WebView(QWebView): """ if fuzzyval: self._zoom.fuzzyval = int(perc) + if perc < 0: + raise CommandError("Can't zoom {}%!".format(perc)) self.setZoomFactor(float(perc) / 100) message.info("Zoom level: {}%".format(perc))