branch: master commit fcef913e82d8242575612fd934ca17762abd872c Author: Muir Manders <m...@mnd.rs> Commit: Oleh Krehel <ohwoeo...@gmail.com>
swiper-isearch: Fix regexes in "ignore-order" case Don't use regexp-opt since that escapes regexes. Instead, escape invalid regexes and just join each aprt on "|". Fixes #2164 --- swiper.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/swiper.el b/swiper.el index 02fc34f..da0f19c 100644 --- a/swiper.el +++ b/swiper.el @@ -1363,7 +1363,10 @@ See `ivy-format-functions-alist' for further information." (re (if (stringp re-full) re-full - (regexp-opt (delq nil (mapcar (lambda (x) (and (cdr x) (car x))) re-full))))) + (mapconcat + #'ivy--regex-or-literal + (delq nil (mapcar (lambda (x) (and (cdr x) (car x))) re-full)) + "\\|"))) (cands (swiper--isearch-function-1 re swiper--isearch-backward))) (when (consp re-full) (setq cands (swiper--isearch-filter-ignore-order re-full cands)))