diff --git a/qutebrowser/browser/history.py b/qutebrowser/browser/history.py index f29beabe1..b07343ba5 100644 --- a/qutebrowser/browser/history.py +++ b/qutebrowser/browser/history.py @@ -89,7 +89,7 @@ class WebHistory(QWebHistoryInterface): 'history', self.save, self.item_added) def __repr__(self): - return utils.get_repr(self, new_length=len(self._new_history)) + return utils.get_repr(self, length=len(self)) def __getitem__(self, key): return self._new_history[key] @@ -97,6 +97,9 @@ class WebHistory(QWebHistoryInterface): def __iter__(self): return iter(self._history_dict.values()) + def __len__(self): + return len(self._history_dict) + def get_recent(self): """Get the most recent history entries.""" old = self._lineparser.get_recent()