From d95063a3bba48710f6682a8fb69edc18bc8e058e Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sat, 10 Aug 2019 23:01:52 -0400 Subject: km/magit-diff-visit-file: Disable magit-diff-visit-previous-blob At some point after this was added, Magit gained support for visiting REV^. My brain's used to this custom variant, so disable the new functionality rather than removing this variant. --- lisp/km-magit.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lisp/km-magit.el') 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)) -- cgit v1.2.3