When the current input goes from matching to non-matching, ensure that
the old overlays are cleaned up.
nil)))
(defun counsel-grep-action (x)
- (when (string-match "\\`\\([0-9]+\\):\\(.*\\)\\'" x)
- (with-ivy-window
+ (with-ivy-window
+ (swiper--cleanup)
+ (when (string-match "\\`\\([0-9]+\\):\\(.*\\)\\'" x)
(let ((file-name counsel--git-grep-dir)
(line-number (match-string-no-properties 1 x)))
(find-file file-name)
(if (eq ivy-exit 'done)
(swiper--ensure-visible)
(unless (eq ivy-exit 'done)
- (swiper--cleanup)
(isearch-range-invisible (line-beginning-position)
(line-end-position))
(swiper--add-overlays (ivy--regex ivy-text))))))))