chiark / gitweb /
Braino: < for <=.
authorSimon Tatham <anakin@pobox.com>
Sun, 31 Dec 2023 15:06:29 +0000 (15:06 +0000)
committerSimon Tatham <anakin@pobox.com>
Sun, 31 Dec 2023 15:06:29 +0000 (15:06 +0000)
Would have caused an unnecessary coarsen_pos() if we were sitting on
the first _non-header_ item in a file at the point when it failed to
extend backwards.

src/file.rs

index da42aaf6e20499ee9f40c4fec4d188128ebc39d5..8727c55fddfa20dc5b4e81a93f2cb0e095e103bf 100644 (file)
@@ -455,7 +455,7 @@ impl<Type: FeedType> ActivityState for FeedFile<Type> {
                                 // Can't extend this any further into the past
                                 // FIXME: this is not tested yet
                                 self.contents.extender = None;
-                                if self.pos.item() <= self.contents.origin {
+                                if self.pos.item() < self.contents.origin {
                                     self.coarsen_pos();
                                     if self.pos.item() <
                                         self.contents.first_index()