feature/lookup: fix some windows not grabbing focus after lookups
This commit is contained in:
parent
b848527f0c
commit
d06d4c4dde
1 changed files with 12 additions and 15 deletions
|
@ -24,21 +24,18 @@
|
||||||
(region-end)))
|
(region-end)))
|
||||||
((xref-backend-identifier-at-point (xref-find-backend)))))
|
((xref-backend-identifier-at-point (xref-find-backend)))))
|
||||||
|
|
||||||
(defun +lookup--jump-to (prop identifier &optional other-window)
|
(defun +lookup--jump-to (prop identifier)
|
||||||
(with-selected-window
|
(let ((fn (plist-get +lookup-current-functions prop))
|
||||||
(if other-window
|
(origin (point-marker)))
|
||||||
(save-excursion (other-window 1) (selected-window))
|
(setq fn (or (command-remapping fn) fn))
|
||||||
(selected-window))
|
(condition-case e
|
||||||
(let ((fn (plist-get +lookup-current-functions prop))
|
(or (if (commandp fn)
|
||||||
(origin (point-marker)))
|
(call-interactively fn)
|
||||||
(condition-case e
|
(funcall fn identifier))
|
||||||
(or (if (commandp fn)
|
(/= (point-marker) origin))
|
||||||
(call-interactively fn)
|
('error
|
||||||
(funcall fn identifier))
|
(message "%s" e)
|
||||||
(/= (point-marker) origin))
|
nil))))
|
||||||
('error
|
|
||||||
(message "%s" e)
|
|
||||||
nil)))))
|
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue