diff options
author | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2015-09-22 05:26:29 +0200 |
---|---|---|
committer | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2015-09-22 05:26:29 +0200 |
commit | e0c2f4948a8496ad6708611a6d442256c8b3508d (patch) | |
tree | 0fb7aba4ba41ebaa028d112d04d215926d2b06be /helm-buffers.el | |
parent | 0af7e22283d6b6c46b72ed6813cbf3511a474b71 (diff) |
Fix migemo for buffers over others filters (#1175).
* helm-buffers.el (helm-source-buffers): Use nomultimatch
symbol for migemo.
(helm-buffer--match-pattern): Fix for migemo.
* helm-source.el (helm-source-sync): Fix docstring.
(helm-source-in-buffer): Fix docstring.
(helm--setup-source): Use nomultimatch symbol in sync and in-buffer.
Diffstat (limited to 'helm-buffers.el')
-rw-r--r-- | helm-buffers.el | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/helm-buffers.el b/helm-buffers.el index 06138d4c..63c7c3aa 100644 --- a/helm-buffers.el +++ b/helm-buffers.el @@ -212,7 +212,7 @@ Only buffer names are fuzzy matched when this is enabled, (with-helm-buffer (helm-force-update)))))) (keymap :initform helm-buffer-map) - (migemo :initform t) + (migemo :initform 'nomultimatch) (volatile :initform t) (help-message :initform 'helm-buffer-help-message) (persistent-help @@ -475,14 +475,17 @@ i.e same color." (and neg neg-test (not neg-test))))))) (defun helm-buffer--match-pattern (pattern candidate) - (let ((fun (if (and helm-buffers-fuzzy-matching + (let ((bfn (if (and helm-buffers-fuzzy-matching + (not helm-migemo-mode) (not (string-match "\\`\\^" pattern))) #'helm--mapconcat-pattern - #'identity))) + #'identity)) + (mfn (if helm-migemo-mode + #'helm-mm-migemo-string-match #'string-match))) (if (string-match "\\`!" pattern) - (not (string-match (funcall fun (substring pattern 1)) - candidate)) - (string-match (funcall fun pattern) candidate)))) + (not (funcall mfn (funcall bfn (substring pattern 1)) + candidate)) + (funcall mfn (funcall bfn pattern) candidate)))) (defun helm-buffers--match-from-mjm (candidate) (let* ((cand (replace-regexp-in-string "^\\s-\\{1\\}" "" candidate)) |