Add basic support for moving popup windows (WIP)

Relevant to #141 #171
This commit is contained in:
Henrik Lissner 2017-09-24 20:46:53 +02:00
parent cfb094e589
commit 2ea01a5b66
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 39 additions and 27 deletions

View file

@ -212,6 +212,16 @@ window parameter."
(when (/= count 0)
(other-window count)))))
;;;###autoload
(defun doom-popup-move (direction)
"Move a popup window to another side of the frame, in DIRECTION, which can be
one of the following: 'left 'right 'up 'down"
(when (doom-popup-p)
(let ((buffer (current-buffer))
(doom-popup-inhibit-autokill t))
(doom/popup-close)
(doom-popup-buffer buffer '(:align direction) 'extend))))
(defun doom--popup-data (window)
(unless (doom-popup-property :fixed window)
(when-let (buffer (window-buffer window))