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

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

[elpa] externals/which-key 16c992f80f 02/11: Displaying just one column


From: ELPA Syncer
Subject: [elpa] externals/which-key 16c992f80f 02/11: Displaying just one column means pages are arranged vertically
Date: Thu, 11 Aug 2022 12:58:11 -0400 (EDT)

branch: externals/which-key
commit 16c992f80fa6394b4dc5166e6c14129ec4946e12
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    Displaying just one column means pages are arranged vertically
    
    Third-party display methods may do that without using a side-window,
    and therefore they don't set `which-key-popup-type' to `side-window'.
    Likewise they might not set `which-key-side-window-location', e.g.,
    because their display method only supports one location.
    
    `which-key-max-display-columns' being 1 is by itself already enough
    of an indicator to know that there won't be multiple columns.
---
 which-key.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/which-key.el b/which-key.el
index d9dcf8dee9..89bdbe8645 100644
--- a/which-key.el
+++ b/which-key.el
@@ -1972,8 +1972,9 @@ is the width of the live window."
          (avl-lines (if prefix-top-bottom (- max-lines 1) max-lines))
          (min-lines (min avl-lines which-key-min-display-lines))
          (avl-width (if prefix (- max-width prefix) max-width))
-         (vertical (and (eq which-key-popup-type 'side-window)
-                        (member which-key-side-window-location '(left right))))
+         (vertical (or (and (eq which-key-popup-type 'side-window)
+                            (member which-key-side-window-location '(left 
right)))
+                      (eq which-key-max-display-columns 1)))
          result)
     (setq result
           (which-key--create-pages-1



reply via email to

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