summaryrefslogtreecommitdiff
path: root/helm-multi-match.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2015-12-09 07:11:32 +0100
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2015-12-09 07:11:32 +0100
commit352b3138b903d342959f6de59ac7d7d887e77afc (patch)
tree0582454c496d5b16bf3a97e1668474f6903966a1 /helm-multi-match.el
parent404d6f67e3a1c77899aac80c8a5525c47c3e8979 (diff)
Fix helm-mm-matching-method set to multi3p on filename completion (#1283).
* helm-multi-match.el (helm-mm-prefix-match): Unquote pattern for string comparison.
Diffstat (limited to 'helm-multi-match.el')
-rw-r--r--helm-multi-match.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/helm-multi-match.el b/helm-multi-match.el
index 59b9c0c6..8045226a 100644
--- a/helm-multi-match.el
+++ b/helm-multi-match.el
@@ -120,7 +120,10 @@ but \"foo\ bar\"=> (\"foobar\")."
helm-mm-prefix-pattern-real)
(defun helm-mm-prefix-match (str &optional pattern)
- (setq pattern (or pattern helm-pattern))
+ ;; In filename completion basename and basedir may be
+ ;; quoted, unquote them for string comparison (Issue #1283).
+ (setq pattern (replace-regexp-in-string
+ "\\\\" "" (or pattern helm-pattern)))
(let ((len (length pattern)))
(and (<= len (length str))
(string= (substring str 0 len) pattern ))))