avy.el (avy-action-copy): Save window and frame

Fixes #133
This commit is contained in:
Oleh Krehel 2016-01-27 09:22:03 +01:00
parent 11fbd70347
commit 5f6dd00f5d

7
avy.el
View File

@ -480,7 +480,12 @@ Set `avy-style' according to COMMMAND as well."
(forward-sexp) (forward-sexp)
(setq str (buffer-substring pt (point))) (setq str (buffer-substring pt (point)))
(kill-new str) (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) (defun avy-action-kill (pt)
"Kill sexp at PT." "Kill sexp at PT."