branch: externals/which-key commit f6ce67d7053d00e11e0eda653e2f39d7955fb3b4 Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
Get which-key--buffer's window from any frame Previously we assumed the buffer was being displayed in a window of the current frame, which isn't the case if e.g. a child frame is being used. We also cannot assume that the third-party code that sets up such a child frame also deletes it. `which-key-posframe' for example merely hides it. --- which-key.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/which-key.el b/which-key.el index 3f5f809..74accfa 100644 --- a/which-key.el +++ b/which-key.el @@ -1175,7 +1175,10 @@ popup)." (defun which-key--popup-showing-p () (and (bufferp which-key--buffer) - (window-live-p (get-buffer-window which-key--buffer)))) + (or (window-live-p (get-buffer-window which-key--buffer)) + (let ((window (get-buffer-window which-key--buffer t))) + (and (window-live-p window) + (frame-visible-p (window-frame window))))))) (defun which-key--show-popup (act-popup-dim) "Show the which-key buffer.