branch: master
commit 5f58f9c52f240767f5a39ee5f6f939092ae2bc32
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
counsel.el (counsel--async-sentinel): Add safeguard to time-since
Fixes #479
---
counsel.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/counsel.el b/counsel.el
index 8c603b7..81c9c25 100644
--- a/counsel.el
+++ b/counsel.el
@@ -144,8 +144,9 @@ Or the time of the last minibuffer update.")
(ivy--sort-maybe
cands))
(setq counsel-grep-last-line nil)
- (setq counsel--async-duration
- (time-to-seconds (time-since counsel--async-start)))
+ (when counsel--async-start
+ (setq counsel--async-duration
+ (time-to-seconds (time-since counsel--async-start))))
(let ((re (funcall ivy--regex-function ivy-text)))
(unless (stringp re)
(setq re (caar re)))