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

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

[elpa] externals/dired-preview a3dd67d46f 59/67: Refine dired-preview-ge


From: ELPA Syncer
Subject: [elpa] externals/dired-preview a3dd67d46f 59/67: Refine dired-preview-get-window-size
Date: Sat, 8 Jul 2023 15:57:55 -0400 (EDT)

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

    Refine dired-preview-get-window-size
    
    Thanks to Bruno Boal[1] for testing this with me.  It was done in a
    private channel and the information is shared with permission.
    
    [1] <https://git.sr.ht/~bboal>
---
 dired-preview.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/dired-preview.el b/dired-preview.el
index 656fe7a7a7..4ca4efd163 100644
--- a/dired-preview.el
+++ b/dired-preview.el
@@ -217,7 +217,10 @@ DIMENSION is either a `:width' or `:height' keyword.  It is
 checked against `split-width-threshold' or
 `split-height-threshold'"
   (pcase dimension
-    (:width fill-column)
+    (:width (if-let ((window-width (floor (window-total-width) 2))
+                     ((> window-width fill-column)))
+                window-width
+              fill-column))
     (:height (floor (window-height) 2))))
 
 (defun dired-preview-display-action-side ()



reply via email to

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