Fix which-key sharing windows with other popups

Which-key is now lazy-loaded, so the modified which-key-popup-type gets
overwritten.
This commit is contained in:
Henrik Lissner 2018-07-06 14:57:40 +02:00
parent 3443cd870a
commit 0b7faa468c
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -281,16 +281,17 @@ instead of switch-to-buffer-*."
;; `which-key'
(setq which-key-popup-type 'custom
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)
(cl-letf (((symbol-function 'display-buffer-in-side-window)
(lambda (buffer alist)
(+popup-display-buffer-stacked-side-window
buffer (append '((vslot . -9999)) alist)))))
(which-key--show-buffer-side-window act-popup-dim))))
(after! which-key
(setq which-key-popup-type 'custom
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)
(cl-letf (((symbol-function 'display-buffer-in-side-window)
(lambda (buffer alist)
(+popup-display-buffer-stacked-side-window
buffer (append '((vslot . -9999)) alist)))))
(which-key--show-buffer-side-window act-popup-dim)))))
;; `windmove'