aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustav Hållberg <gustav@gmail.com>2010-04-15 16:36:16 +0200
committerGustav Hållberg <gustav@gmail.com>2010-04-30 00:28:33 +0200
commit2570f6e584712f2f5b133d183319f4f26b55e1fa (patch)
treec589739ad98a47339573b1e222e9d3ce7a4ef8b5
parentbf7e391cbf0673575fe73915fd71c0920d0f217a (diff)
downloadstgit-2570f6e584712f2f5b133d183319f4f26b55e1fa.tar.gz
stgit.el: Make stgit-reload move point more intuitively when a patch disappears
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
-rw-r--r--contrib/stgit.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/contrib/stgit.el b/contrib/stgit.el
index dc09b1d..3e60c92 100644
--- a/contrib/stgit.el
+++ b/contrib/stgit.el
@@ -580,8 +580,9 @@ been advised to update the stgit status when necessary.")
shows the working tree\n")
'face 'stgit-description-face)))
(stgit-run-series stgit-ewoc)
- (if curpatch
- (stgit-goto-patch curpatch (and curfile (stgit-file->file curfile)))
+ (unless (and curpatch
+ (stgit-goto-patch curpatch
+ (and curfile (stgit-file->file curfile))))
(goto-line curline)))
(stgit-refresh-git-status))
@@ -1482,8 +1483,8 @@ allow historical commits; if nil, also allow work tree and index."
(t nil)))))
(defun stgit-goto-patch (patchsym &optional file)
- "Move point to the line containing patch PATCHSYM.
-If that patch cannot be found, do nothing.
+ "Move point to the line containing patch PATCHSYM and return non-nil.
+If that patch cannot be found, do nothing and return nil.
If the patch was found and FILE is not nil, instead move to that
file's line. If FILE cannot be found, stay on the line of