diff --git a/contrib/!source-control/git/extensions.el b/contrib/!source-control/git/extensions.el index 557a5a394..eff7ac151 100644 --- a/contrib/!source-control/git/extensions.el +++ b/contrib/!source-control/git/extensions.el @@ -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)