ivy: Fix counsel search

This function was renamed upstream:
58bf1b94c8
This commit is contained in:
Aaron Jensen 2018-12-26 17:23:28 -08:00 committed by Codruț Constantin Gușoi
parent 8b3a30f240
commit 2c28c7d219
2 changed files with 6 additions and 1 deletions

View file

@ -79,7 +79,7 @@
(prog1 (pop split) (prog1 (pop split)
(setq string (mapconcat #'identity split " -- ")))) (setq string (mapconcat #'identity split " -- "))))
"")) ""))
(regex (counsel-unquote-regex-parens (regex (counsel--elisp-to-pcre
(setq ivy--old-re (setq ivy--old-re
(ivy--regex string))))) (ivy--regex string)))))
(setq spacemacs--counsel-search-cmd (format base-cmd args regex)) (setq spacemacs--counsel-search-cmd (format base-cmd args regex))

View file

@ -119,6 +119,11 @@
"stP" 'spacemacs/search-project-pt-region-or-symbol)) "stP" 'spacemacs/search-project-pt-region-or-symbol))
:config :config
(progn (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 ;; set additional ivy actions
(ivy-set-actions (ivy-set-actions
'counsel-find-file 'counsel-find-file