From 739d2cfffda8f51036e09a403d1c72a59470cad4 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 2 Oct 2015 22:54:56 +0200 Subject: [PATCH] Fix displaying of web history if limited to -1. This is a regression introduced in 2aa7e5bb358a226e5c7ed3cb9f6c34fc7a6d8a9a. Fixes #991. --- CHANGELOG.asciidoc | 5 +++++ qutebrowser/completion/models/urlmodel.py | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 210a86cd1..8893eefc8 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -36,6 +36,11 @@ Changed - The `colors -> tabs.bg/fg.selected` option got split into `tabs.bg/fg.selected.odd/even`. +Fixed +~~~~~ + +- Fixed displaying of web history if `web-history-max-items` is set to -1. + v0.4.1 ------ diff --git a/qutebrowser/completion/models/urlmodel.py b/qutebrowser/completion/models/urlmodel.py index d3d5122c2..a313b9c0a 100644 --- a/qutebrowser/completion/models/urlmodel.py +++ b/qutebrowser/completion/models/urlmodel.py @@ -102,7 +102,8 @@ class UrlCompletionModel(base.BaseCompletionModel): self._fmt_atime(entry.atime), sort=int(entry.atime), userdata=entry.url) - if self._history_cat.rowCount() > self._max_history: + if (self._max_history != -1 and + self._history_cat.rowCount() > self._max_history): self._remove_oldest_history() @config.change_filter('completion', 'timestamp-format')