diff options
author | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2017-01-05 20:18:05 +0100 |
---|---|---|
committer | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2017-01-05 20:18:05 +0100 |
commit | 6e219b763ae6f0a50b6f00b644a2f71efe552403 (patch) | |
tree | d44835e2c152e090728f661f59620d1ca42d9b16 /helm-locate.el | |
parent | 9245b6986e4314f73469990d5c5352a4d5ff6f10 (diff) |
Fix last errors in locate pattern transformer.
* helm-locate.el (helm-locate-pattern-transformer):
Fix errors when going back and forth from multimatch and fuzzy.
Diffstat (limited to 'helm-locate.el')
-rw-r--r-- | helm-locate.el | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/helm-locate.el b/helm-locate.el index edc0acda..d36cb2ad 100644 --- a/helm-locate.el +++ b/helm-locate.el @@ -336,16 +336,17 @@ See also `helm-locate'." ;; When fuzzy is enabled helm add "-b" option on startup. (cond ((string-match-p " " (replace-regexp-in-string " -b" "" pattern)) - (when (string-match-p "\\`locate -b" helm-locate-command) - (setq helm-locate-command (replace-regexp-in-string - "locate -b" "locate" helm-locate-command))) + (when (string-match "\\`locate -b" helm-locate-command) + (setq helm-locate-command + (replace-match "locate" t t helm-locate-command))) pattern) ((string-match "\\([^ ]*\\) -b" pattern) (helm--mapconcat-pattern (match-string 1 pattern))) (t (unless (string-match-p "\\`locate -b" helm-locate-command) - (setq helm-locate-command (replace-regexp-in-string - "locate" "locate -b" helm-locate-command))) + (setq helm-locate-command + (replace-regexp-in-string + "\\`locate" "locate -b" helm-locate-command))) (helm--mapconcat-pattern pattern))) pattern)) |