emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/dired-preview 077f24db3c 45/67: Tweak how window size i


From: ELPA Syncer
Subject: [elpa] externals/dired-preview 077f24db3c 45/67: Tweak how window size is calculated
Date: Sat, 8 Jul 2023 15:57:54 -0400 (EDT)

branch: externals/dired-preview
commit 077f24db3c363c9d50771acb26300dd9f4bdda21
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Tweak how window size is calculated
---
 dired-preview.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/dired-preview.el b/dired-preview.el
index 99c2b3785c..b672b8342f 100644
--- a/dired-preview.el
+++ b/dired-preview.el
@@ -181,11 +181,14 @@ checked against `split-width-threshold' or
 `split-height-threshold'"
   (pcase dimension
     (:width (if (and (numberp split-width-threshold)
-                     (> (window-width) split-width-threshold)
+                     (> (window-total-width) split-width-threshold)
                      (> split-width-threshold fill-column))
                 split-width-threshold
               fill-column))
-    (:height (floor split-height-threshold 2))))
+    (:height (if (and (numberp split-height-threshold)
+                      (> (window-total-height) split-height-threshold))
+                 split-height-threshold
+               (floor (window-height) 2)))))
 
 (defun dired-preview-display-action-side ()
   "Pick a side window that is appropriate for the given frame."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]