X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=emacs%2Fnotmuch-tree.el;h=1ab0810d59270809173be0957818c621a17a805d;hp=d5587a9c6351ca052f23311ae2c865f58ee2688d;hb=8128c7b5aad880e572b9ca4ee509f776bcb3e901;hpb=0c6cd0fb028b1cbd4a0d512f2a2c6dd86a647512 diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el index d5587a9c..1ab0810d 100644 --- a/emacs/notmuch-tree.el +++ b/emacs/notmuch-tree.el @@ -364,12 +364,18 @@ updated." (defun notmuch-tree-tag-update-display (&optional tag-changes) "Update display for TAG-CHANGES to current message. -Does NOT change the database." +Updates the message in the message pane if appropriate, but does +NOT change the database." (let* ((current-tags (notmuch-tree-get-tags)) - (new-tags (notmuch-update-tags current-tags tag-changes))) + (new-tags (notmuch-update-tags current-tags tag-changes)) + (tree-msg-id (notmuch-tree-get-message-id))) (unless (equal current-tags new-tags) (notmuch-tree-set-tags new-tags) - (notmuch-tree-refresh-result)))) + (notmuch-tree-refresh-result) + (when (window-live-p notmuch-tree-message-window) + (with-selected-window notmuch-tree-message-window + (when (string= tree-msg-id (notmuch-show-get-message-id)) + (notmuch-show-update-tags new-tags))))))) (defun notmuch-tree-tag (tag-changes) "Change tags for the current message"