Permalink
Browse files

* helm.el (tramp-read-passwd): Advice to suspend update when promptin…

…g for a tramp password.
  • Loading branch information...
1 parent 7baca8f commit 60ce5f54febe3fd7baf27f3b3699d1c44b973224 @thierryvolpiatto thierryvolpiatto committed Nov 20, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 helm.el
View
@@ -1633,6 +1633,14 @@ This can be useful for e.g writing quietly a complex regexp."
"Helm update suspended!"
"Helm update reenabled!")))
+(declare-function tramp-read-passwd "tramp" (proc &optional prompt))
+(defadvice tramp-read-passwd (around disable-helm-update activate)
+ ;; Suspend update when prompting for a tramp password.
+ (setq helm-suspend-update-flag t)
+ (unwind-protect
+ ad-do-it
+ (setq helm-suspend-update-flag nil)))
+
(defun helm-maybe-update-keymap ()
"Handle differents keymaps in multiples sources.
This function is meant to be run in `helm-move-selection-after-hook'.

0 comments on commit 60ce5f5

Please sign in to comment.