Refactor doom/window-zoom
Inspired by gilbertw1/bmacs's +gdoom/toggle-maximize-buffer
This commit is contained in:
parent
263580b92f
commit
3dcc423308
1 changed files with 5 additions and 9 deletions
|
@ -29,12 +29,8 @@
|
||||||
"Maximize and isolate the current buffer. Activate again to undo this. If the
|
"Maximize and isolate the current buffer. Activate again to undo this. If the
|
||||||
window changes before then, the undo expires."
|
window changes before then, the undo expires."
|
||||||
(interactive)
|
(interactive)
|
||||||
(unless (one-window-p)
|
(if (and (one-window-p)
|
||||||
(setq doom-window-zoomed nil))
|
(assoc ?_ register-alist))
|
||||||
(if doom-window-zoomed
|
(jump-to-register ?_)
|
||||||
(progn
|
(window-configuration-to-register ?_)
|
||||||
(set-window-configuration doom-window-zoomed)
|
(delete-other-windows)))
|
||||||
(setq doom-window-zoomed nil))
|
|
||||||
(unless (one-window-p t)
|
|
||||||
(setq doom-window-zoomed (current-window-configuration))
|
|
||||||
(delete-other-windows))))
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue