Add doom/window-zoom to core/autoload/ui

This commit is contained in:
Henrik Lissner 2017-02-19 18:11:44 -05:00
parent 11a5e15e4e
commit a46829a06c

View file

@ -25,3 +25,17 @@
(mapc 'disable-theme custom-enabled-themes))
(load-theme theme t)))
;;;###autoload
(defun doom/window-zoom ()
"Maximize and isolate the current buffer. Activate again to undo this. If the
window changes before then, the undo expires."
(interactive)
(unless (one-window-p)
(setq doom-window-zoomed nil))
(if doom-window-zoomed
(progn
(set-window-configuration doom-window-zoomed)
(setq doom-window-zoomed nil))
(unless (one-window-p t)
(setq doom-window-zoomed (current-window-configuration))
(delete-other-windows))))