From 1161d292f68194dbb79f0d047b98fe5802f841f2 Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Sat, 30 Aug 2008 20:37:44 +0300 Subject: [PATCH] Goto "Unstaged changed" when creating status buffer. * magit.el (magit-update-status): Goto first unstaged change when point is still at beginning of buffer. --- magit.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/magit.el b/magit.el index 165a589f..9d045b5b 100644 --- a/magit.el +++ b/magit.el @@ -714,7 +714,9 @@ Please see the manual for a complete description of Magit. "git" "log" "--graph" "--pretty=oneline" (format "%s/%s..HEAD" remote branch)))) (magit-goto-line old-line) - (magit-goto-section old-section)) + (magit-goto-section old-section) + (when (bobp) + (magit-goto-section '(unstaged 1 1)))) (magit-refresh-marks-in-buffer buf) (magit-highlight-item)))