summaryrefslogtreecommitdiff
path: root/helm-ring.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2013-09-27 15:28:02 +0200
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2013-09-27 15:28:02 +0200
commit44973809df544f5d981ec31d76a2428534e8b2d1 (patch)
tree4af5107d1529b46087a499a04be8ca9a9141b489 /helm-ring.el
parente5007d993f3d1de6b8145c59bf9d9e62542aa613 (diff)
* helm-ring.el (helm-kill-ring-action): Delay insertion, Fix point after inserted text.
Diffstat (limited to 'helm-ring.el')
-rw-r--r--helm-ring.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/helm-ring.el b/helm-ring.el
index e4c6f65d..f811c639 100644
--- a/helm-ring.el
+++ b/helm-ring.el
@@ -111,7 +111,7 @@ replace with STR as yanked string."
(with-helm-current-buffer
(setq kill-ring (delete str kill-ring))
(if (not (eq (helm-attr 'last-command helm-source-kill-ring) 'yank))
- (insert-for-yank str)
+ (run-with-timer 0.01 nil `(lambda () (insert-for-yank ,str)))
;; from `yank-pop'
(let ((inhibit-read-only t)
(before (< (point) (mark t))))
@@ -120,7 +120,7 @@ replace with STR as yanked string."
(funcall (or yank-undo-function 'delete-region) (mark t) (point)))
(setq yank-undo-function nil)
(set-marker (mark-marker) (point) helm-current-buffer)
- (insert-for-yank str)
+ (run-with-timer 0.01 nil `(lambda () (insert-for-yank ,str)))
;; Set the window start back where it was in the yank command,
;; if possible.
(set-window-start (selected-window) yank-window-start t)