Fix off-by-one error when concatenating ranges when doing a partial update.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Sat, 18 Sep 2010 18:30:43 +0000 (20:30 +0200)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Sat, 18 Sep 2010 18:30:43 +0000 (20:30 +0200)
lisp/ChangeLog
lisp/nnimap.el

index 4526d99..d2c24a9 100644 (file)
@@ -6,6 +6,8 @@
        (nnimap-wait-for-connection): New function.
        (nnimap-open-connection): If we have PREAUTH, don't query for login
        credentials.
+       (nnimap-update-info): Fix off-by-one error when concatenating ranges
+       when doing a partial update.
 
 2010-09-18  Julien Danjou  <julien@danjou.info>
 
index 4552595..db60504 100644 (file)
@@ -631,9 +631,11 @@ not done by default on servers that doesn't support that command.")
          (when (> start-article 1)
            (setq read
                  (gnus-range-nconcat
-                  (gnus-sorted-range-intersection
-                   (cons 1 start-article)
-                   (gnus-info-read info))
+                  (if (> start-article 1)
+                      (gnus-sorted-range-intersection
+                       (cons 1 (1- start-article))
+                       (gnus-info-read info))
+                    (gnus-info-read info))
                   read)))
          (gnus-info-set-read info read)
          ;; Update the marks.