diff options
author | Kyle Meyer <kyle@kyleam.com> | 2019-08-10 23:01:52 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2019-08-10 23:04:46 -0400 |
commit | d95063a3bba48710f6682a8fb69edc18bc8e058e (patch) | |
tree | f03a90b2c922fd3d34a22262c82f154e117372e9 | |
parent | 33a12f8635ee4bb4b390cfd4fe8e2095dd3d276c (diff) | |
download | emacs.d-d95063a3bba48710f6682a8fb69edc18bc8e058e.tar.gz |
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.
-rw-r--r-- | lisp/km-magit.el | 10 |
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)) |