diff options
author | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2013-11-15 08:55:54 +0100 |
---|---|---|
committer | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2013-11-15 08:55:54 +0100 |
commit | 927f9be7beeb1afd410c5a5141236d71bae67eaf (patch) | |
tree | 89efb5f41eb47bfdbedd8723374d1ac13c1cd7a3 /helm-eval.el | |
parent | d8f127bfd77a8e2ff270e2def30a3614ffb5bb6a (diff) |
* helm-eval.el (helm-source-evaluation-result): Simplify action 1.
Diffstat (limited to 'helm-eval.el')
-rw-r--r-- | helm-eval.el | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/helm-eval.el b/helm-eval.el index d5dd40a0..7387e714 100644 --- a/helm-eval.el +++ b/helm-eval.el @@ -80,12 +80,9 @@ Should take one arg: the string to display." (eval (read helm-pattern))))) (error "Error"))))) (action . (("Copy result to kill-ring" . (lambda (candidate) - (with-current-buffer helm-buffer - (let ((end (save-excursion - (goto-char (point-max)) - (search-backward "\n") - (point)))) - (kill-region (point) end))))) + (kill-new + (replace-regexp-in-string + "\n" "" candidate)))) ("copy sexp to kill-ring" . (lambda (candidate) (kill-new helm-input))))))) |