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)))
|
||||
((xref-backend-identifier-at-point (xref-find-backend)))))
|
||||
|
||||
(defun +lookup--jump-to (prop identifier &optional other-window)
|
||||
(with-selected-window
|
||||
(if other-window
|
||||
(save-excursion (other-window 1) (selected-window))
|
||||
(selected-window))
|
||||
(let ((fn (plist-get +lookup-current-functions prop))
|
||||
(origin (point-marker)))
|
||||
(condition-case e
|
||||
(or (if (commandp fn)
|
||||
(call-interactively fn)
|
||||
(funcall fn identifier))
|
||||
(/= (point-marker) origin))
|
||||
('error
|
||||
(message "%s" e)
|
||||
nil)))))
|
||||
(defun +lookup--jump-to (prop identifier)
|
||||
(let ((fn (plist-get +lookup-current-functions prop))
|
||||
(origin (point-marker)))
|
||||
(setq fn (or (command-remapping fn) fn))
|
||||
(condition-case e
|
||||
(or (if (commandp fn)
|
||||
(call-interactively fn)
|
||||
(funcall fn identifier))
|
||||
(/= (point-marker) origin))
|
||||
('error
|
||||
(message "%s" e)
|
||||
nil))))
|
||||
|
||||
|
||||
;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue