branch: master
commit 78d20e0b027b2aac0492cbecc9e8402b353cd3e0
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
Fix jumping to other frames
* avy.el (avy--goto): Select the window frame if needed.
Fixes #54
---
avy.el | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/avy.el b/avy.el
index 8ca8350..7d5e376 100644
--- a/avy.el
+++ b/avy.el
@@ -395,7 +395,11 @@ POS is either a position or (BEG . END)."
((eq x 'exit))
(t
- (select-window (cdr x))
+ (let* ((window (cdr x))
+ (frame (window-frame window)))
+ (unless (equal frame (selected-frame))
+ (select-frame-set-input-focus frame))
+ (select-window window))
(let ((pt (car x)))
(when (consp pt)
(setq pt (car pt)))