From 491e80a5683e6c96c09189228c739973c23fe1dc Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 21 Dec 2019 02:14:36 -0500 Subject: [PATCH] Fix cut-off which-key popups #2219 --- modules/ui/popup/+hacks.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/ui/popup/+hacks.el b/modules/ui/popup/+hacks.el index 1418e8dc5..c3a76e7a2 100644 --- a/modules/ui/popup/+hacks.el +++ b/modules/ui/popup/+hacks.el @@ -316,7 +316,8 @@ Ugh, such an ugly hack." (after! which-key (when (eq which-key-popup-type 'side-window) (setq which-key-popup-type 'custom - which-key-custom-popup-max-dimensions-function (lambda (_) (which-key--side-window-max-dimensions)) + which-key-custom-popup-max-dimensions-function + (lambda (_) (which-key--side-window-max-dimensions)) which-key-custom-hide-popup-function #'which-key--hide-buffer-side-window which-key-custom-show-popup-function (lambda (act-popup-dim) @@ -324,6 +325,8 @@ Ugh, such an ugly hack." (lambda (buffer alist) (+popup-display-buffer-stacked-side-window-fn buffer (append '((vslot . -9999)) alist))))) + ;; HACK Fix #2219 where the which-key popup would get cut off. + (setcar act-popup-dim (1+ (car act-popup-dim))) (which-key--show-buffer-side-window act-popup-dim))))))