mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38:08 +01:00
emacs/show: save redisplay redisplay data when showing lazy part.
This data will be used to redisplay an image that is hidden by deleting it from the buffer. We cannot easily delay until the image is hidden, as we won't have the original data at that point.
This commit is contained in:
parent
b1129d905a
commit
bfcfa947f8
1 changed files with 4 additions and 1 deletions
|
@ -1019,10 +1019,13 @@ will return nil if the CID is unknown or cannot be retrieved."
|
||||||
(part-end (copy-marker (point) t))
|
(part-end (copy-marker (point) t))
|
||||||
;; We have to save the depth as we can't find the depth
|
;; We have to save the depth as we can't find the depth
|
||||||
;; when narrowed.
|
;; when narrowed.
|
||||||
(depth (notmuch-show-get-depth)))
|
(depth (notmuch-show-get-depth))
|
||||||
|
(mime-type (plist-get (cadr part-args) :computed-type)))
|
||||||
(save-restriction
|
(save-restriction
|
||||||
(narrow-to-region part-beg part-end)
|
(narrow-to-region part-beg part-end)
|
||||||
(delete-region part-beg part-end)
|
(delete-region part-beg part-end)
|
||||||
|
(when (and mime-type (string-match "^image/" mime-type))
|
||||||
|
(button-put button :notmuch-redisplay-data part-args))
|
||||||
(apply #'notmuch-show-insert-bodypart-internal part-args)
|
(apply #'notmuch-show-insert-bodypart-internal part-args)
|
||||||
(indent-rigidly part-beg
|
(indent-rigidly part-beg
|
||||||
part-end
|
part-end
|
||||||
|
|
Loading…
Reference in a new issue