Add sanity check to not delete marks outside the active range.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Tue, 21 Sep 2010 23:22:51 +0000 (01:22 +0200)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Tue, 21 Sep 2010 23:22:51 +0000 (01:22 +0200)
Suggested by Dan Christensen.

lisp/ChangeLog
lisp/gnus-sum.el

index 0d77ddf..0aae9ef 100644 (file)
@@ -1,5 +1,11 @@
 2010-09-21  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * gnus-sum.el (gnus-update-marks): Add sanity check to not delete marks
+       outside the active range.  Suggested by Dan Christensen.
+
+       * gnus-start.el (gnus-get-unread-articles): Get the extended method
+       slightly later to avoid double-getting it.
+
        * nnml.el (nnml-generate-nov-file): Fix variable name clobbering from
        previous patch.
 
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