tools/magit: fix +magit/quit & default display fn
When used with magit-display-buffer-traditional, q wouldn't close the window, just kill the buffer inside.
This commit is contained in:
parent
a078e3f4b2
commit
f0465f22cc
1 changed files with 7 additions and 3 deletions
|
@ -53,9 +53,13 @@
|
|||
"Clean up magit buffers after quitting `magit-status' and refresh version
|
||||
control in buffers."
|
||||
(interactive)
|
||||
(if (cdr (delq nil (mapcar (lambda (win) (with-selected-window win (eq major-mode 'magit-status-mode)))
|
||||
(window-list))))
|
||||
(quit-window)
|
||||
(unless (cdr
|
||||
(delq nil
|
||||
(mapcar (lambda (win)
|
||||
(with-selected-window win
|
||||
(eq major-mode 'magit-status-mode)))
|
||||
(window-list))))
|
||||
(mapc #'+magit--kill-buffer (magit-mode-get-buffers))
|
||||
(dolist (buffer (buffer-list))
|
||||
(with-current-buffer buffer
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue