branch: elpa/magit
commit b55c5c4f5901a27207d5400f84827470ede39259
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>

    magit-blob-visit: Use magit-find-file when visiting worktree file
    
    Otherwise the location would not be preserved.
---
 lisp/magit-files.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/magit-files.el b/lisp/magit-files.el
index a0fdff6c8b0..d7920bf9571 100644
--- a/lisp/magit-files.el
+++ b/lisp/magit-files.el
@@ -414,7 +414,7 @@ the same location in the respective file in the working 
tree."
 
 (defun magit-blob-visit (blob-or-file)
   (if (stringp blob-or-file)
-      (find-file blob-or-file)
+      (magit-find-file "{worktree}" blob-or-file)
     (pcase-let ((`(,rev ,file) blob-or-file))
       (magit-find-file rev file)
       (apply #'message "%s (%s %s ago)"

Reply via email to