Keeps previous position on toggle-maximize-buffer

This commit is contained in:
Ag Ibragimov 2018-10-18 15:41:28 -07:00 committed by Codruț Constantin Gușoi
parent 5c91e6a39c
commit 27b2fb424a
1 changed files with 7 additions and 6 deletions

View File

@ -120,12 +120,13 @@ automatically applied to."
(defun spacemacs/toggle-maximize-buffer ()
"Maximize buffer"
(interactive)
(if (and (= 1 (length (window-list)))
(assoc ?_ register-alist))
(jump-to-register ?_)
(progn
(window-configuration-to-register ?_)
(delete-other-windows))))
(save-excursion
(if (and (= 1 (length (window-list)))
(assoc ?_ register-alist))
(jump-to-register ?_)
(progn
(window-configuration-to-register ?_)
(delete-other-windows)))))
;; https://tsdh.wordpress.com/2007/03/28/deleting-windows-vertically-or-horizontally/
(defun spacemacs/maximize-horizontally ()