Skip to content

Commit

Permalink
ivy: Fix counsel search
Browse files Browse the repository at this point in the history
This function was renamed upstream:
abo-abo/swiper@58bf1b9
  • Loading branch information
aaronjensen authored and sdwolfz committed Dec 28, 2018
1 parent 8b3a30f commit 2c28c7d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion layers/+completion/ivy/funcs.el
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
(prog1 (pop split)
(setq string (mapconcat #'identity split " -- "))))
""))
(regex (counsel-unquote-regex-parens
(regex (counsel--elisp-to-pcre
(setq ivy--old-re
(ivy--regex string)))))
(setq spacemacs--counsel-search-cmd (format base-cmd args regex))
Expand Down
5 changes: 5 additions & 0 deletions layers/+completion/ivy/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@
"stP" 'spacemacs/search-project-pt-region-or-symbol))
:config
(progn
;; Temporarily handle older versions of ivy
;; https://github.com/abo-abo/swiper/pull/1863/files
(unless (fboundp 'counsel--elisp-to-pcre)
(defalias 'counsel--elisp-to-pcre 'counsel-unquote-regex-parens))

;; set additional ivy actions
(ivy-set-actions
'counsel-find-file
Expand Down

0 comments on commit 2c28c7d

Please sign in to comment.