Removing a duplicate switch-to-buffer
We don't need to change buffer twice when we use a new buffer
This commit is contained in:
parent
3bdaf275db
commit
0bb2e4c86f
1 changed files with 4 additions and 5 deletions
9
magit.el
9
magit.el
|
@ -2495,11 +2495,10 @@ insert a line to tell how to insert more of them"
|
|||
(setq topdir (magit-get-top-dir dir))))
|
||||
(when topdir
|
||||
(let ((buf (or (magit-find-buffer 'status topdir)
|
||||
(switch-to-buffer
|
||||
(get-buffer-create
|
||||
(concat "*magit: "
|
||||
(file-name-nondirectory
|
||||
(directory-file-name topdir)) "*"))))))
|
||||
(get-buffer-create
|
||||
(concat "*magit: "
|
||||
(file-name-nondirectory
|
||||
(directory-file-name topdir)) "*")))))
|
||||
(switch-to-buffer buf)
|
||||
(magit-mode-init topdir 'status #'magit-refresh-status)
|
||||
(magit-status-mode t)))))
|
||||
|
|
Loading…
Reference in a new issue