doom/window-maximizer-buffer: fail gracefully in popups

Doesn't work within popups and it's non-trivial to fix this, so better
it fail gracefully with a suggestion, instead of fail silently.
This commit is contained in:
Henrik Lissner 2019-06-27 17:20:05 +02:00
parent d6aa19b638
commit 81cf6080bf
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -105,6 +105,9 @@ Alternatively, use `doom/window-enlargen'."
(if (and (one-window-p) (if (and (one-window-p)
(assq ?_ register-alist)) (assq ?_ register-alist))
(jump-to-register ?_) (jump-to-register ?_)
(when (and (bound-and-true-p +popup-mode)
(+popup-window-p))
(user-error "Cannot maximize a popup, use `+popup/raise' first or use `doom/window-enlargen' instead"))
(window-configuration-to-register ?_) (window-configuration-to-register ?_)
(delete-other-windows))) (delete-other-windows)))