branch: master
commit 5f6dd00f5df4cd6e7236b17ad4b34e86b22940ef
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
avy.el (avy-action-copy): Save window and frame
Fixes #133
---
avy.el | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/avy.el b/avy.el
index 45f2120..78332c7 100644
--- a/avy.el
+++ b/avy.el
@@ -480,7 +480,12 @@ Set `avy-style' according to COMMMAND as well."
(forward-sexp)
(setq str (buffer-substring pt (point)))
(kill-new str)
- (message "Copied: %s" str))))
+ (message "Copied: %s" str)))
+ (let ((dat (ring-ref avy-ring 0)))
+ (select-frame-set-input-focus
+ (window-frame (cdr dat)))
+ (select-window (cdr dat))
+ (goto-char (car dat))))
(defun avy-action-kill (pt)
"Kill sexp at PT."