mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-05 22:20:24 -08:00
Eglot: fix call hierarchy navigation again (bug#78367, bug#78250)
* lisp/progmodes/eglot.el (eglot--hierarchy-label): Fix again.
This commit is contained in:
parent
5b73625714
commit
c69c18b732
1 changed files with 16 additions and 7 deletions
|
|
@ -4617,13 +4617,22 @@ If NOERROR, return predicate, else erroring function."
|
||||||
'keymap eglot-hierarchy-label-map
|
'keymap eglot-hierarchy-label-map
|
||||||
'action
|
'action
|
||||||
(lambda (_btn)
|
(lambda (_btn)
|
||||||
(pop-to-buffer (find-file-noselect (eglot-uri-to-path (or parent-uri uri))))
|
(let* ((method
|
||||||
(eglot--goto
|
(get-text-property 0 'eglot--hierarchy-method name))
|
||||||
(or
|
(target-uri
|
||||||
(elt
|
(if (eq method :callHierarchy/outgoingCalls)
|
||||||
(get-text-property 0 'eglot--hierarchy-call-sites name)
|
;; We probably want `parent-uri' for this edge case
|
||||||
0)
|
;; because that's where the call site we want
|
||||||
item-range))))
|
;; lives. (bug#78250, bug#78367).
|
||||||
|
(or parent-uri uri)
|
||||||
|
uri)))
|
||||||
|
(pop-to-buffer (find-file-noselect (eglot-uri-to-path target-uri)))
|
||||||
|
(eglot--goto
|
||||||
|
(or
|
||||||
|
(elt
|
||||||
|
(get-text-property 0 'eglot--hierarchy-call-sites name)
|
||||||
|
0)
|
||||||
|
item-range)))))
|
||||||
(buffer-string))))
|
(buffer-string))))
|
||||||
|
|
||||||
(defun eglot--hierarchy-1 (name provider preparer specs)
|
(defun eglot--hierarchy-1 (name provider preparer specs)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue