mu4e-view: improve html/text toggling
Fix the mu4e-view-toggle-html switching, which could re-insert body parts when an Attachments: header was present. I.e. specifically toggle the part in the body.
This commit is contained in:
@ -1091,8 +1091,12 @@ corresponding Gnus selector button in the buffer."
|
||||
(lambda (h) (equal (mm-handle-media-type h) "text/plain"))
|
||||
children))
|
||||
(target (if (mm-handle-displayed-p html) plain html))
|
||||
(pos (text-property-any (point-min) (point-max)
|
||||
'gnus-data target)))
|
||||
;; Search from the body (this avoids find the wrong
|
||||
;; `gnus-data' in the Attachments: header, if any.
|
||||
(pos (save-excursion
|
||||
(article-goto-body)
|
||||
(text-property-any (point) (point-max)
|
||||
'gnus-data target))))
|
||||
(progn
|
||||
(goto-char pos)
|
||||
(gnus-article-press-button)
|
||||
|
||||
Reference in New Issue
Block a user