When we have zero articles, return the right data to Gnus.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Tue, 21 Sep 2010 16:10:05 +0000 (18:10 +0200)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Tue, 21 Sep 2010 16:10:05 +0000 (18:10 +0200)
lisp/ChangeLog
lisp/nnimap.el

index 9975f91..7e2dfa6 100644 (file)
@@ -1,5 +1,8 @@
 2010-09-21  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * nnimap.el (nnimap-request-group): When we have zero articles, return
+       the right data to Gnus.
+
        * gnus-sum.el (gnus-summary-move-article): When respooling to the same
        method, this would bug out.
 
index 3def294..7822f50 100644 (file)
@@ -421,14 +421,12 @@ textual parts.")
                (setq high (nth 3 (car marks))
                      low (nth 4 (car marks))))
               ((re-search-backward "UIDNEXT \\([0-9]+\\)" nil t)
-               (setq high (string-to-number (match-string 1))
+               (setq high (1- (string-to-number (match-string 1)))
                      low 1)))))
          (erase-buffer)
          (insert
           (format
-           "211 %d %d %d %S\n"
-           (1+ (- high low))
-           low high group))))
+           "211 %d %d %d %S\n" (1+ (- high low)) low high group))))
       t)))
 
 (deffoo nnimap-request-create-group (group &optional server args)