diff options
author | marty hiatt <martianhiatus@riseup.net> | 2024-03-13 12:01:30 +0100 |
---|---|---|
committer | marty hiatt <martianhiatus@riseup.net> | 2024-03-13 12:01:30 +0100 |
commit | 71b92fdd9c3e7a56542efcf65dadd2475785c609 (patch) | |
tree | 135eec43cad82e9978c85dbe67ee23b52cc5ff09 /lisp/mastodon-media.el | |
parent | 7384db8e3a0c35bc896803a5701f74fd1b84b8e8 (diff) |
media: call image-transform-fit-both in masto-image buf
Diffstat (limited to 'lisp/mastodon-media.el')
-rw-r--r-- | lisp/mastodon-media.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/mastodon-media.el b/lisp/mastodon-media.el index 77bf680..bc902aa 100644 --- a/lisp/mastodon-media.el +++ b/lisp/mastodon-media.el @@ -194,8 +194,8 @@ STATUS-PLIST is a plist of status events as per `url-retrieve'." (let* ((handle (mm-dissect-buffer t)) (image (mm-get-image handle)) (str (image-property image :data))) - (setf (image-property image :max-width) - (window-pixel-width)) + ;; (setf (image-property image :max-width) + ;; (window-pixel-width)) (with-current-buffer (get-buffer-create "*masto-image*") (let ((inhibit-read-only t)) (erase-buffer) @@ -203,7 +203,8 @@ STATUS-PLIST is a plist of status events as per `url-retrieve'." (special-mode) ; prevent image-mode loop bug (image-mode) (goto-char (point-min)) - (switch-to-buffer-other-window (current-buffer))))))) + (switch-to-buffer-other-window (current-buffer)) + (image-transform-fit-both)))))) (defun mastodon-media--load-image-from-url (url media-type start region-length) "Take a URL and MEDIA-TYPE and load the image asynchronously. |