(nnimap-parse-flags): Parse the data in any order.
[gnus] / lisp / gnus-sum.el
index 5997339..c4a7216 100644 (file)
@@ -5976,6 +5976,10 @@ If SELECT-ARTICLES, only select those articles from GROUP."
            (when add
              (push (list add 'add (list (cdr type))) delta-marks))
            (when del
+             ;; Don't delete marks from outside the active range.  This
+             ;; shouldn't happen, but is a sanity check.
+             (setq del (gnus-sorted-range-intersection
+                        (gnus-active gnus-newsgroup-name) del))
              (push (list del 'del (list (cdr type))) delta-marks))))
 
        (when list