From 98c6d4ff90a6af49b166d19a41c8f1e716c4a858 Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Wed, 13 Aug 2008 17:25:32 +0300 Subject: [PATCH] Avoid setting the mark when updating the status buffer. * magit.el (magit-goto-line): New. (magit-update-status): Use it. --- magit.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/magit.el b/magit.el index 4844789f..e505f28d 100644 --- a/magit.el +++ b/magit.el @@ -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)))