summaryrefslogtreecommitdiff
path: root/lisp/km-magit.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/km-magit.el')
-rw-r--r--lisp/km-magit.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/km-magit.el b/lisp/km-magit.el
index e25ebf2..4da1a3f 100644
--- a/lisp/km-magit.el
+++ b/lisp/km-magit.el
@@ -550,17 +550,19 @@ show tags by default."
(goto-char pos)))
(defun km/magit-diff-visit-file (&optional prev-rev other-window)
- "Like `magit-diff-visit-file', but with the option to visit REV^.
+ "Like `magit-diff-visit-file', but change REV^ visiting behavior.
If prefix argument PREV-REV is non-nil, visit the file for REV^
-instead of REV. If not in `magit-revision-mode', the prefix
-argument has no effect.
+instead of REV. `magit-diff-visit-previous-blob' is
+unconditionally disabled. If not in `magit-revision-mode', the
+prefix argument has no effect.
OTHER-WINDOW corresponds to `magit-diff-visit-file's OTHER-WINDOW
argument. Interactively, this can be accessed using the command
`km/magit-diff-visit-file-other-window'."
(interactive "P")
- (let ((magit-buffer-revision (if (and prev-rev
+ (let ((magit-diff-visit-previous-blob nil)
+ (magit-buffer-revision (if (and prev-rev
(derived-mode-p 'magit-revision-mode))
(concat magit-buffer-revision "^")
magit-buffer-revision))