diff --git a/qutebrowser/config/configdata.py b/qutebrowser/config/configdata.py index 23d3efb67..92878d931 100644 --- a/qutebrowser/config/configdata.py +++ b/qutebrowser/config/configdata.py @@ -503,7 +503,7 @@ def data(readonly=False): "0: no history / -1: unlimited"), ('web-history-max-items', - SettingValue(typ.Int(minval=-1), '-1'), + SettingValue(typ.Int(minval=-1, maxval=MAXVALS['int64']), '-1'), "How many URLs to show in the web history.\n\n" "0: no history / -1: unlimited"), diff --git a/tests/unit/completion/test_histcategory.py b/tests/unit/completion/test_histcategory.py index 0b5fcb915..c53c86ee1 100644 --- a/tests/unit/completion/test_histcategory.py +++ b/tests/unit/completion/test_histcategory.py @@ -110,6 +110,15 @@ def test_set_pattern(pattern, before, after, model_validator, hist): ('c', 'c', '2017-05-16'), ('a', 'a', '2017-04-16'), ]), + (2 ** 63 - 1, [ # Maximum value sqlite can handle for LIMIT + ('a', 'a', '2017-04-16'), + ('b', 'b', '2017-06-16'), + ('c', 'c', '2017-05-16'), + ], [ + ('b', 'b', '2017-06-16'), + ('c', 'c', '2017-05-16'), + ('a', 'a', '2017-04-16'), + ]), (2, [ ('a', 'a', '2017-04-16'), ('b', 'b', '2017-06-16'),