branch: elpa/helm
commit fb5c5b3f36dcf634b7deb396193c8c05878bf6ff
Author: Thierry Volpiatto <thie...@posteo.net>
Commit: Thierry Volpiatto <thie...@posteo.net>

    Ensure to restore helm-fuzzy-sort-fn to default value in helm-M-x
    
    Because helm-fuzzy-sort-fn is let-bounded, when helm-M-x exit and call
    another helm function, helm-fuzzy-sort-fn value previously let-bounded
    is still used.
---
 helm-command.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/helm-command.el b/helm-command.el
index 4e709a3400..3b292ce942 100644
--- a/helm-command.el
+++ b/helm-command.el
@@ -342,7 +342,8 @@ default to `extended-command-history'."
     (when (timerp helm-M-x--timer)
       (cancel-timer helm-M-x--timer)
       (setq helm-M-x--timer nil))
-    (setq helm--mode-line-display-prefarg nil)
+    (setq helm--mode-line-display-prefarg nil
+          helm-fuzzy-sort-fn (default-toplevel-value 'helm-fuzzy-sort-fn))
     ;; Be sure to remove it here as well in case of quit.
     (remove-hook 'helm-move-selection-after-hook
                  'helm-M-x--move-selection-after-hook)

Reply via email to