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:
Marius Vollmer 2008-09-29 23:35:39 +03:00
parent e6e3aa1b3a
commit fcd6bfcaf7

View file

@ -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))