Fix displaying of web history if limited to -1.

This is a regression introduced in 2aa7e5bb35.
Fixes #991.
This commit is contained in:
Florian Bruhin 2015-10-02 22:54:56 +02:00
parent 7761dd5af4
commit 739d2cfffd
2 changed files with 7 additions and 1 deletions

View File

@ -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
------

View File

@ -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')