summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-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))