Implement fullscreen magit status without advices
This commit is contained in:
parent
e923ae7fb7
commit
5df4ba0e75
|
@ -87,17 +87,11 @@
|
|||
|
||||
;; full screen magit-status
|
||||
(when git-magit-status-fullscreen
|
||||
(defadvice magit-status (around magit-fullscreen activate)
|
||||
(window-configuration-to-register :magit-fullscreen)
|
||||
ad-do-it
|
||||
(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))
|
||||
(setq magit-restore-window-configuration t)
|
||||
(setq magit-status-buffer-switch-function
|
||||
(lambda (buffer)
|
||||
(pop-to-buffer buffer)
|
||||
(delete-other-windows))))
|
||||
|
||||
(defun magit-toggle-whitespace ()
|
||||
(interactive)
|
||||
|
|
Loading…
Reference in a new issue