Switched to window-body-* for getting window dimensions.
authorplugd <plugd@thelambdalab.xyz>
Tue, 3 Aug 2021 07:43:38 +0000 (09:43 +0200)
committerplugd <plugd@thelambdalab.xyz>
Tue, 3 Aug 2021 07:43:38 +0000 (09:43 +0200)
elpher.el

index 0cd846a..ccba716 100644 (file)
--- a/elpher.el
+++ b/elpher.el
@@ -1132,12 +1132,8 @@ If ADDRESS is not supplied or nil the record is rendered as an
                        nil t))
                (window (get-buffer-window elpher-buffer-name)))
           (when window
-            (setf (image-property image :max-width) (window-pixel-width window))
-            (setf (image-property image :max-height) (- (window-pixel-height window)
-                                                       (window-header-line-height window)
-                                                       (window-mode-line-height window)
-                                                       (window-scroll-bar-height window)
-                                                       (window-bottom-divider-width window))))
+            (setf (image-property image :max-width) (window-body-width window t))
+            (setf (image-property image :max-height) (window-body-height window t)))
           (elpher-with-clean-buffer
            (insert-image image)
            (elpher-restore-pos)))