branch: master commit 19dcc0ff119f5fc099829979ed36043b1b42eefc Author: Oleh Krehel <ohwoeo...@gmail.com> Commit: Oleh Krehel <ohwoeo...@gmail.com>
ivy.el (ivy--regex): Improve for trailing backslash When there's a single trailing backslash, which would result in a bad regex, ignore it. --- ivy.el | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/ivy.el b/ivy.el index dc6c412..a768c18 100644 --- a/ivy.el +++ b/ivy.el @@ -1073,6 +1073,8 @@ When GREEDY is non-nil, join words in a greedy way." (if hashed (prog1 (cdr hashed) (setq ivy--subexps (car hashed))) + (when (string-match "\\([^\\]\\|^\\)\\\\$" str) + (setq str (substring str 0 -1))) (cdr (puthash str (let ((subs (ivy--split str))) (if (= (length subs) 1)