Skip to content

Commit 5e28fc4

Browse files
authored
Merge pull request #114 from emacs-php/feature/open-file-add-target
Make phpactor-action-open-file expect target
2 parents 5dc3316 + d983937 commit 5e28fc4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

phpactor.el

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,11 +385,16 @@ of GitHub.")
385385
(apply #'phpactor-action-dispatch (list :action (plist-get action :name) :parameters (plist-get action :parameters))))
386386
actions))
387387

388-
(cl-defun phpactor-action-open-file (&key path offset force_reload)
388+
(cl-defun phpactor-action-open-file (&key path offset force_reload target)
389389
"Open file from Phpactor."
390390
(unless (and path offset)
391391
(user-error "Definition not found"))
392392

393+
;; TODO: Implement other target: Phpactor\Extension\Rpc\Response\OpenFileResponse
394+
;; `target' expects "focused_window", "vsplit", "hsplit" and "new_tab"
395+
(unless target
396+
(setq target "focused_window"))
397+
393398
(if (fboundp 'xref-push-marker-stack)
394399
(xref-push-marker-stack)
395400
(with-no-warnings

0 commit comments

Comments
 (0)