Fix cut-off which-key popups #2219

This commit is contained in:
Henrik Lissner 2019-12-21 02:14:36 -05:00
parent 960f403e2e
commit 491e80a568
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -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))))))