From 3c7133769842700f509e0470d3203ec95b4aa1d7 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 5 Jul 2016 11:14:04 +0200 Subject: [PATCH] Handle OverflowError when scrolling --- qutebrowser/browser/commands.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py index 001da7f4c..69c4458b8 100644 --- a/qutebrowser/browser/commands.py +++ b/qutebrowser/browser/commands.py @@ -626,7 +626,12 @@ class CommandDispatcher: self.navigate(top_navigate) return - tab.scroll.delta_page(count * x, count * y) + try: + tab.scroll.delta_page(count * x, count * y) + except OverflowError: + raise cmdexc.CommandError( + "Numeric argument is too large for internal int " + "representation.") @cmdutils.register(instance='command-dispatcher', scope='window') def yank(self, title=False, sel=False, domain=False, pretty=False):