diff options
author | Tomeu Vizoso <tomeu@tomeuvizoso.net> | 2007-09-08 17:02:49 (GMT) |
---|---|---|
committer | Tomeu Vizoso <tomeu@tomeuvizoso.net> | 2007-09-08 17:02:49 (GMT) |
commit | bd2de16c3638b0ba37e42ea666a2d29b56bcf5a6 (patch) | |
tree | 398a08542654717e7efa3a8a584f4660900e4355 | |
parent | 7fbb24fbb9477650d25b2bfde0bab04226c5bcef (diff) |
Fix one corner case in scrolling optimization.
-rw-r--r-- | query.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -153,7 +153,7 @@ class ResultSet(gobject.GObject): self._position = position def read(self, max_count): - logging.debug('ResultSet.read') + logging.debug('ResultSet.read position: %r' % self._position) if self._position == -1: self.seek(0) @@ -170,7 +170,7 @@ class ResultSet(gobject.GObject): last_cached_entry = self._offset + len(self._cache) - if (remaining_forward_entries == 0 and remaining_backwards_entries == 0) or \ + if (remaining_forward_entries <= 0 and remaining_backwards_entries <= 0) or \ max_count > ResultSet._CACHE_LIMIT: # Total cache miss: remake it |