File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -335,10 +335,12 @@ the user entering a value in the *garden* buffer."
335335 (find-file file-name)
336336 ; ; For prelude and builtins, we don't have a fully qualified
337337 ; ; path. Switch to the current prelude.gdn or builtins.gdn,
338- ; ; if open.
339- (let ((target-buf (--find (string= (buffer-name it) file-name) (buffer-list ))))
340- (when target-buf
341- (switch-to-buffer target-buf)))))
338+ ; ; relative to this elisp file.
339+ (let* ((elisp-file-path (symbol-file 'garden-mode ))
340+ (elisp-dir (directory-file-name (file-name-directory elisp-file-path)))
341+ (garden-src-root (file-name-directory elisp-dir))
342+ (path (concat garden-src-root " src/" file-name)))
343+ (find-file path))))
342344
343345(defun garden--visit (file-and-line-num )
344346 " Visit a position expressed in the format \" /path/foo.gdn:123\" ."
You can’t perform that action at this time.
0 commit comments