From: Oleh Krehel Date: Wed, 20 Apr 2016 10:26:28 +0000 (+0200) Subject: counsel.el (counsel--async-sentinel): Add safeguard to time-since X-Git-Url: https://code.delx.au/gnu-emacs-elpa/commitdiff_plain/5f58f9c52f240767f5a39ee5f6f939092ae2bc32 counsel.el (counsel--async-sentinel): Add safeguard to time-since Fixes #479 --- diff --git a/counsel.el b/counsel.el index 8c603b702..81c9c2565 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)))