Implement fullscreen magit status without advices
This commit is contained in:
parent
e923ae7fb7
commit
5df4ba0e75
|
@ -87,17 +87,11 @@
|
||||||
|
|
||||||
;; full screen magit-status
|
;; full screen magit-status
|
||||||
(when git-magit-status-fullscreen
|
(when git-magit-status-fullscreen
|
||||||
(defadvice magit-status (around magit-fullscreen activate)
|
(setq magit-restore-window-configuration t)
|
||||||
(window-configuration-to-register :magit-fullscreen)
|
(setq magit-status-buffer-switch-function
|
||||||
ad-do-it
|
(lambda (buffer)
|
||||||
(delete-other-windows))
|
(pop-to-buffer buffer)
|
||||||
|
(delete-other-windows))))
|
||||||
(defun magit-quit-session ()
|
|
||||||
"Restores the previous window configuration and kills the magit buffer"
|
|
||||||
(interactive)
|
|
||||||
(kill-buffer)
|
|
||||||
(jump-to-register :magit-fullscreen))
|
|
||||||
(define-key magit-status-mode-map (kbd "q") 'magit-quit-session))
|
|
||||||
|
|
||||||
(defun magit-toggle-whitespace ()
|
(defun magit-toggle-whitespace ()
|
||||||
(interactive)
|
(interactive)
|
||||||
|
|
Loading…
Reference in a new issue