mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
Refactor doom/window-zoom
Inspired by gilbertw1/bmacs's +gdoom/toggle-maximize-buffer
This commit is contained in:
@ -29,12 +29,8 @@
|
||||
"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))))
|
||||
(if (and (one-window-p)
|
||||
(assoc ?_ register-alist))
|
||||
(jump-to-register ?_)
|
||||
(window-configuration-to-register ?_)
|
||||
(delete-other-windows)))
|
||||
|
Reference in New Issue
Block a user