branch: master
commit 7edfbc9d521a04cc5c24360eb358489563880320
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
ivy.el (ivy--exhibit): Wrap in `while-no-input'
* ivy.el (ivy--exhibit): `ivy--dynamic-function' will sometimes use
`call-process'. Adding `while-no-input' speeds up things a lot, at the
cost of a small message interrupting the minibuffer when
`call-process' takes too long or the user types too fast.
This message is not an issue for emacs-snapshot.
---
ivy.el | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/ivy.el b/ivy.el
index 66b3f3a..5f52262 100644
--- a/ivy.el
+++ b/ivy.el
@@ -687,13 +687,14 @@ Should be run via minibuffer `post-command-hook'."
(if ivy--dynamic-function
;; while-no-input would cause annoying
;; "Waiting for process to die...done" message interruptions
- (progn
- (unless (equal ivy--old-text ivy-text)
- (let ((store ivy--dynamic-function)
- (ivy--dynamic-function nil))
- (setq ivy--all-candidates (funcall store ivy-text)))
- (setq ivy--old-text ivy-text))
- (ivy--insert-minibuffer (ivy--format ivy--all-candidates)))
+ (let ((inhibit-message t))
+ (while-no-input
+ (unless (equal ivy--old-text ivy-text)
+ (let ((store ivy--dynamic-function)
+ (ivy--dynamic-function nil))
+ (setq ivy--all-candidates (funcall store ivy-text)))
+ (setq ivy--old-text ivy-text))
+ (ivy--insert-minibuffer (ivy--format ivy--all-candidates))))
(when ivy--directory
(if (string-match "/$" ivy-text)
(if (member ivy-text ivy--all-candidates)