Always refresh the status buffer.
* magit.el (magit-refresh-wrapper): Initialize magit-refresh-needing-buffers with the status buffer. (magit-need-refresh): Don't add a buffer twice.
This commit is contained in:
parent
e6e3aa1b3a
commit
fcd6bfcaf7
1 changed files with 6 additions and 4 deletions
10
magit.el
10
magit.el
|
@ -986,7 +986,8 @@ Please see the manual for a complete description of Magit.
|
|||
(defun magit-refresh-wrapper (func)
|
||||
(if magit-refresh-pending
|
||||
(funcall func)
|
||||
(let ((magit-refresh-needing-buffers nil)
|
||||
(let ((magit-refresh-needing-buffers
|
||||
(list (magit-find-buffer 'status default-directory)))
|
||||
(magit-refresh-pending t))
|
||||
(unwind-protect
|
||||
(funcall func)
|
||||
|
@ -995,9 +996,10 @@ Please see the manual for a complete description of Magit.
|
|||
(magit-refresh-buffer b))))))
|
||||
|
||||
(defun magit-need-refresh (&optional buffer)
|
||||
(setq magit-refresh-needing-buffers (cons (or buffer
|
||||
(current-buffer))
|
||||
magit-refresh-needing-buffers)))
|
||||
(let ((buffer (or buffer (current-buffer))))
|
||||
(when (not (memq buffer magit-refresh-needing-buffers))
|
||||
(setq magit-refresh-needing-buffers
|
||||
(cons buffer magit-refresh-needing-buffers)))))
|
||||
|
||||
(defmacro magit-with-refresh (&rest body)
|
||||
(declare (indent 0))
|
||||
|
|
Loading…
Add table
Reference in a new issue