branch: master commit 7032df7c6d3d195d0e943201e08641816c14185e Author: Oleh Krehel <ohwoeo...@gmail.com> Commit: Oleh Krehel <ohwoeo...@gmail.com>
counsel.el (counsel-git-grep): Fixup --- counsel.el | 17 ++++++++--------- 1 files changed, 8 insertions(+), 9 deletions(-) diff --git a/counsel.el b/counsel.el index a99bda8..f41608d 100644 --- a/counsel.el +++ b/counsel.el @@ -229,15 +229,14 @@ (ivy--dynamic-function (when (> counsel--git-grep-count 20000) 'counsel-git-grep-function)) (ivy--persistent-action (lambda (x) - (setq lst (split-string x ":")) - (find-file (expand-file-name (car lst) counsel--git-grep-dir)) - (goto-char (point-min)) - (forward-line (1- (string-to-number (cadr lst)))) - (setq swiper--window (selected-window)) - (swiper--cleanup) - (swiper--add-overlays (ivy--regex ivy-text)))) - (val (ivy-read "pattern: " 'counsel-git-grep-function)) - lst) + (let ((lst (split-string x ":"))) + (find-file (expand-file-name (car lst) counsel--git-grep-dir)) + (goto-char (point-min)) + (forward-line (1- (string-to-number (cadr lst)))) + (setq swiper--window (selected-window)) + (swiper--cleanup) + (swiper--add-overlays (ivy--regex ivy-text))))) + (val (ivy-read "pattern: " 'counsel-git-grep-function))) (when val (funcall ivy--persistent-action val))) (swiper--cleanup)))