]> git.eshelyaron.com Git - emacs.git/commitdiff
Report correct unread count for nnimap groups
authorDan Christensen <jdc@uwo.ca>
Fri, 11 Oct 2024 13:31:52 +0000 (15:31 +0200)
committerEshel Yaron <me@eshelyaron.com>
Tue, 15 Oct 2024 19:43:32 +0000 (21:43 +0200)
* lisp/gnus/nnimap.el (nnimap-request-group): Use '(1 . 0) range
as default, and calculate the actual range the same way as other
backends.  (Bug@72949)

Copyright-paperwork-exempt: Yes
(cherry picked from commit 5c129791c5b1639481c109cc44974c7d9b7f3dcf)

lisp/gnus/nnimap.el

index 7b0e42ff89d87945c651217943020100a56be590..16ed338a0de7ec506646e0408a237864db233b24 100644 (file)
@@ -918,10 +918,10 @@ during splitting, which may be slow."
            (nnimap-finish-retrieve-group-infos server info sequences
                                                t)
            (setq active (nth 2 (assoc group nnimap-current-infos)))))
-       (setq active (or active '(0 . 1)))
+       (setq active (or active '(1 . 0)))
        (erase-buffer)
        (insert (format "211 %d %d %d %S\n"
-                       (- (cdr active) (car active))
+                       (max (1+ (- (cdr active) (car active))) 0)
                        (car active)
                        (cdr active)
                        group))