fix: unresponsive which-key C-h bindings

Since the which-key window didn't have focus, its C-h keybinds were
unpredictably unresponsive, making next/previous-page navigation et co
finnicky. This commit restores the needed focus.

Ref https://www.reddit.com/r/emacs/comments/pwr7va/comment/heydq4g
This commit is contained in:
Henrik Lissner 2021-10-01 11:15:17 +02:00
parent 54b4e83f95
commit b58fad7eee

View file

@ -374,9 +374,9 @@ Ugh, such an ugly hack."
which-key-custom-hide-popup-function #'which-key--hide-buffer-side-window which-key-custom-hide-popup-function #'which-key--hide-buffer-side-window
which-key-custom-show-popup-function which-key-custom-show-popup-function
(lambda (act-popup-dim) (lambda (act-popup-dim)
(letf! ((defun display-buffer-in-side-window (buffer alist) (letf! (defun display-buffer-in-side-window (buffer alist)
(+popup-display-buffer-stacked-side-window-fn (+popup-display-buffer-stacked-side-window-fn
buffer (append '((vslot . -9999)) alist)))) buffer (append '((vslot . -9999) (select . t)) alist)))
;; HACK Fix #2219 where the which-key popup would get cut off. ;; HACK Fix #2219 where the which-key popup would get cut off.
(setcar act-popup-dim (1+ (car act-popup-dim))) (setcar act-popup-dim (1+ (car act-popup-dim)))
(which-key--show-buffer-side-window act-popup-dim)))))) (which-key--show-buffer-side-window act-popup-dim))))))