diff --git a/qutebrowser/browser/qutescheme.py b/qutebrowser/browser/qutescheme.py index f43212557..1d89b409f 100644 --- a/qutebrowser/browser/qutescheme.py +++ b/qutebrowser/browser/qutescheme.py @@ -252,9 +252,7 @@ def history_data(start_time, offset=None): return [{"url": e.url, "title": html.escape(e.title) or html.escape(e.url), "time": e.atime} - for e in entries - if not any(pattern.matches(QUrl(e.url)) - for pattern in config.val.history.exclude)] + for e in entries] @add_handler('history') diff --git a/qutebrowser/config/configdata.yml b/qutebrowser/config/configdata.yml index 15743f7f0..1e386b967 100644 --- a/qutebrowser/config/configdata.yml +++ b/qutebrowser/config/configdata.yml @@ -1065,8 +1065,8 @@ history.exclude: desc: >- A list of patterns which should not be shown in the history. - This only affects the completion and qute://history page. Matching URLs are - still saved in the history, but hidden. + This only affects the completion. Matching URLs are still saved in the + history (and visible on the qute://history page), but hidden. Changing this setting will cause the completion history to be regenerated on the next start, which will take a short while. diff --git a/tests/unit/browser/test_qutescheme.py b/tests/unit/browser/test_qutescheme.py index 2db98a933..2a46fa632 100644 --- a/tests/unit/browser/test_qutescheme.py +++ b/tests/unit/browser/test_qutescheme.py @@ -135,15 +135,13 @@ class TestHistoryHandler: assert item['time'] > end_time def test_exclude(self, fake_web_history, now, config_stub): + """Make sure the history.exclude setting does not apply.""" config_stub.set_obj('history.exclude', ['www.x.com']) - url = QUrl('http://www.example.org/') - fake_web_history.add_from_tab(url, url, 'title') url = QUrl("qute://history/data?start_time={}".format(now)) _mimetype, data = qutescheme.qute_history(url) items = json.loads(data) - assert len(items) == 1 - assert items[0]['url'] == 'http://www.example.org/' + assert items def test_qute_history_benchmark(self, fake_web_history, benchmark, now): r = range(100000)