summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--helm-dabbrev.el26
1 files changed, 13 insertions, 13 deletions
diff --git a/helm-dabbrev.el b/helm-dabbrev.el
index c8b399af..78a5f409 100644
--- a/helm-dabbrev.el
+++ b/helm-dabbrev.el
@@ -269,9 +269,20 @@ removed."
;; at startup.
(unless (or cycling-disabled-p
(helm-dabbrev-info-p helm-dabbrev--data))
+ (setq helm-dabbrev--data
+ (make-helm-dabbrev-info
+ :dabbrev dabbrev
+ :limits limits
+ :iterator
+ (helm-iter-list
+ (cl-loop for i in (helm-dabbrev--get-candidates
+ dabbrev helm-dabbrev-cycle-threshold)
+ when (string-match-p
+ (concat "^" (regexp-quote dabbrev)) i)
+ collect i))))
;; FIXME: For some reason the thread is blocking after the first
;; insertion and we have to wait the function building cache
- ;; finish before insertion of second candidate, why? Is is an
+ ;; finish before insertion of second candidate, why? Is it an
;; emacs bug? This is reproductible when the limit is high and
;; helm is collecting a huge list of candidates.
(if (fboundp 'make-thread)
@@ -281,18 +292,7 @@ removed."
(setq helm-dabbrev--cache
(helm-dabbrev--get-candidates dabbrev)))))
(setq helm-dabbrev--cache
- (helm-dabbrev--get-candidates dabbrev)))
- (setq helm-dabbrev--data
- (make-helm-dabbrev-info
- :dabbrev dabbrev
- :limits limits
- :iterator
- (helm-iter-list
- (cl-loop for i in (helm-dabbrev--get-candidates
- dabbrev helm-dabbrev-cycle-threshold)
- when (string-match-p
- (concat "^" (regexp-quote dabbrev)) i)
- collect i)))))
+ (helm-dabbrev--get-candidates dabbrev))))
(let ((iter (and (helm-dabbrev-info-p helm-dabbrev--data)
(helm-dabbrev-info-iterator helm-dabbrev--data)))
deactivate-mark)