From 65fd4a8c61b2d7c417eb8a0d6a1186519d989c3f Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Tue, 20 Mar 2018 23:25:33 -0400 Subject: km/magit-pin-file: Detect indirect buffers --- lisp/km-magit.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) -- cgit v1.2.3