fix(popup): ensure hooks run in popup buffer/window

Ref: 13b64229a0
This commit is contained in:
Henrik Lissner
2025-04-09 15:59:47 -04:00
parent a39a5c24af
commit eae2529ed8
2 changed files with 7 additions and 6 deletions

View File

@ -206,7 +206,8 @@ and enables `+popup-buffer-mode'."
(when-let (popup (cl-loop for func in actions
if (funcall func buffer alist)
return it))
(+popup--init popup alist)
(with-current-buffer buffer
(+popup--init popup alist))
(+popup--maybe-select-window popup origin)
popup))))

View File

@ -168,11 +168,11 @@ prevent the popup(s) from messing up the UI (or vice versa)."
(add-hook 'doom-init-ui-hook #'+popup-mode 'append)
(add-hook! '+popup-buffer-mode-hook
#'+popup-adjust-fringes-h
#'+popup-adjust-margins-h
#'+popup-set-modeline-on-enable-h
#'+popup-unset-modeline-on-disable-h)
(add-hook '+popup-buffer-mode-hook #'+popup-set-modeline-on-enable-h)
(add-hook '+popup-buffer-mode-hook #'+popup-unset-modeline-on-disable-h)
(add-hook '+popup-create-window-hook #'+popup-adjust-fringes-h)
(add-hook '+popup-create-window-hook #'+popup-adjust-margins-h)
;;