Skip to content

Commit

Permalink
Revert "Handle buffer pos in ivy--action-insert"
Browse files Browse the repository at this point in the history
This reverts commit 9f0e989.
  • Loading branch information
dustinpaluch committed Apr 6, 2022
1 parent 641e533 commit adc9a65
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions ivy.el
Original file line number Diff line number Diff line change
Expand Up @@ -4578,12 +4578,10 @@ Otherwise, forward to `ivy-kill-line'."
x))

(defun ivy--action-insert (x)
(insert (cond ((stringp x) (ivy--trim-grep-line-number x))
;; swiper-isearch passes buffer pos
((numberp x) (save-excursion
(goto-char x)
(buffer-substring (line-beginning-position) (line-end-position))))
(t x (car x)))))
(insert
(if (stringp x)
(ivy--trim-grep-line-number x)
x (car x))))

(defun ivy--action-copy (x)
(kill-new
Expand Down

0 comments on commit adc9a65

Please sign in to comment.