]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix nnimap tick/readedness thinko introduced some weeks back
authorLars Ingebrigtsen <larsi@gnus.org>
Wed, 9 Oct 2019 20:46:05 +0000 (22:46 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Wed, 9 Oct 2019 20:46:05 +0000 (22:46 +0200)
* lisp/gnus/nnimap.el (nnimap-request-set-mark): Fix thinko in the
tick/read change: Unticking a message shouldn't make it unread,
but ticking it should make it read.

lisp/gnus/nnimap.el

index d4681e2b436739232f8aa51f14a748e7bb88efa9..1ec5522831dab914af5e5f4bfb1c10e7320a609d 100644 (file)
@@ -1189,11 +1189,11 @@ If LIMIT, first try to limit the search to the N last articles."
        ;; response.  If they're successful, they're successful.
        (dolist (action actions)
          (cl-destructuring-bind (range action marks) action
-           ;; If we add/remove a tick mark, then do the same with the
-           ;; readedness mark on the IMAP server.  Other IMAP clients
-           ;; can have marked messages without having them read, but
-           ;; Gnus can't.
-           (when (memq 'tick marks)
+           ;; If we add a tick mark, then also mark the message as
+           ;; read.  Other IMAP clients can have marked messages
+           ;; without having them read, but Gnus can't.
+           (when (and (memq 'tick marks)
+                      (eq action 'add))
              (push 'read marks))
            (let ((flags (nnimap-marks-to-flags marks)))
              (when flags