Fix magit-status-no-new-window failing to open repos by symlink

`let`s `default-directory` instead of using the `directory` argument
of `magit-status`. This allows it to use it's normal directory
handling.
This commit is contained in:
Adam Goldsmith 2020-08-04 20:55:03 -04:00
parent 25eecc532f
commit 99390edb5c

View File

@ -480,10 +480,11 @@
:init
(defun magit-status-no-new-window (directory)
(interactive "D")
(progn (let ((magit-display-buffer-function
(let ((magit-display-buffer-function
'(lambda (buffer)
(display-buffer buffer '(display-buffer-same-window)))))
(magit-status directory)))))
(display-buffer buffer '(display-buffer-same-window))))
(default-directory directory))
(magit-status))))
(use-package popwin :ensure
:disabled