diff options
author | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2017-02-23 20:48:14 +0100 |
---|---|---|
committer | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2017-02-23 20:49:04 +0100 |
commit | 957cdec57a885cf4d235903043bbffcafa900a94 (patch) | |
tree | 44d94cc9de4bf0f28fc57f58e381898c05c38090 /helm-dabbrev.el | |
parent | 08941dee6bce79ff1cb456e8f28483f47b8486b1 (diff) |
New user var helm-dabbrev-candidates-number-limit.
* helm-dabbrev.el (helm-dabbrev-candidates-number-limit): New.
(helm-dabbrev--get-candidates): Use it.
Diffstat (limited to 'helm-dabbrev.el')
-rw-r--r-- | helm-dabbrev.el | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/helm-dabbrev.el b/helm-dabbrev.el index 5659de99..cc2917aa 100644 --- a/helm-dabbrev.el +++ b/helm-dabbrev.el @@ -42,6 +42,12 @@ Have no effect when `helm-dabbrev-always-search-all' is non--nil." :group 'helm-dabbrev :type 'integer) +(defcustom helm-dabbrev-candidates-number-limit 500 + "Maximum number of candidates to collect before stopping. +Higher this number is slower the computation of candidates will be." + :group 'helm-dabbrev + :type 'integer) + (defcustom helm-dabbrev-ignored-buffers-regexps '("\\*helm" "\\*Messages" "\\*Echo Area" "\\*Buffer List") "List of regexps matching names of buffers that helm-dabbrev should not check." @@ -203,7 +209,7 @@ but the initial search for all candidates in buffer(s)." (with-current-buffer (current-buffer) (let* ((dabbrev-get (lambda (str all-bufs) (helm-dabbrev--collect - str helm-candidate-number-limit + str helm-dabbrev-candidates-number-limit (cl-case helm-dabbrev-case-fold-search (smart (helm-set-case-fold-search-1 abbrev)) (t helm-dabbrev-case-fold-search)) |