summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2018-03-20 23:25:33 -0400
committerKyle Meyer <kyle@kyleam.com>2018-03-20 23:26:55 -0400
commit65fd4a8c61b2d7c417eb8a0d6a1186519d989c3f (patch)
tree524c3e18fa829907a639b68f586c43de84401912
parentaaf6e548dcf829b717687428d560612bc66f3b35 (diff)
downloademacs.d-65fd4a8c61b2d7c417eb8a0d6a1186519d989c3f.tar.gz
km/magit-pin-file: Detect indirect buffers
-rw-r--r--lisp/km-magit.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/km-magit.el b/lisp/km-magit.el
index 678bc21..76b87c5 100644
--- a/lisp/km-magit.el
+++ b/lisp/km-magit.el
@@ -377,7 +377,7 @@ the file has changed."
(or (magit-get-current-branch)
(magit-rev-parse "HEAD")))))
(fname (file-relative-name
- (or buffer-file-name
+ (or (buffer-file-name (buffer-base-buffer))
magit-buffer-file-name
(user-error "Buffer not visiting file")))))
(if rev (magit-find-file rev fname) (find-file fname))