Skip to content

Commit 299347f

Browse files
authored
Merge pull request #134 from emacs-php/fix-open-file-for-navigation
fix path for navigation
2 parents f846453 + c360eab commit 299347f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

phpactor.el

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,8 @@ have to ensure a compatible version of phpactor is used."
440440
"Open file from Phpactor."
441441
(unless (and path offset)
442442
(user-error "Definition not found"))
443+
(unless (file-name-absolute-p path)
444+
(setq path (expand-file-name path (phpactor-get-working-dir))))
443445

444446
;; TODO: Implement other target: Phpactor\Extension\Rpc\Response\OpenFileResponse
445447
;; `target' expects "focused_window", "vsplit", "hsplit" and "new_tab"

0 commit comments

Comments
 (0)