From d818014bd319f50f71b223d4e9cf7129101d8655 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Sat, 18 Sep 2010 20:30:43 +0200 Subject: [PATCH] Fix off-by-one error when concatenating ranges when doing a partial update. --- lisp/ChangeLog | 2 ++ lisp/nnimap.el | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4526d9999..d2c24a938 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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 diff --git a/lisp/nnimap.el b/lisp/nnimap.el index 4552595b6..db60504e0 100644 --- a/lisp/nnimap.el +++ b/lisp/nnimap.el @@ -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. -- 2.34.1