From d8928d4aabee69934a930a0ce5f3f1fac5846178 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 3 Oct 2018 00:50:06 -0400 Subject: [PATCH] ui/popup: fix which-key vslot fix Prevents which-key from "sharing" popups. Reported by @mfiano --- modules/ui/popup/+hacks.el | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/modules/ui/popup/+hacks.el b/modules/ui/popup/+hacks.el index 500149021..bed4445d4 100644 --- a/modules/ui/popup/+hacks.el +++ b/modules/ui/popup/+hacks.el @@ -301,16 +301,18 @@ 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 + (when (eq which-key-popup-type 'side) + (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'