Avoid setting the mark when updating the status buffer.

* magit.el (magit-goto-line): New.
(magit-update-status): Use it.
This commit is contained in:
Marius Vollmer 2008-08-13 17:25:32 +03:00
parent 8ac6b4d8bd
commit 98c6d4ff90

View file

@ -44,6 +44,12 @@
;;; Utilities
(defun magit-goto-line (line)
(save-restriction
(widen)
(goto-char 1)
(forward-line (1- line))))
(defun magit-shell (cmd &rest args)
(let ((str (shell-command-to-string (apply 'format cmd args))))
(if (string= str "")
@ -448,7 +454,7 @@ pushed.
"Unpushed commits:" 'magit-wash-log
"git" "log" "--graph" "--pretty=oneline"
(format "%s/%s..HEAD" remote branch))))
(goto-line old-line)
(magit-goto-line old-line)
(magit-goto-section old-section))
(magit-refresh-marks-in-buffer buf)))