Elffuss BraidHub

kikocis/company-english-helper public

Just limit size when fuzz search.
Changeset0c0cc64b5ec1875946f7f070ce14ffd5293bd8f85e89c9ee9efe69ed1ae99320
AuthorAndy Stewart <lazycat.manatee@gmail.com> · 2018-09-14 23:50 +08:00
CommitterAndy Stewart <lazycat.manatee@gmail.com> · 2018-09-14 23:50 +08:00
Parentsb9b9ce6a2975

Browse the files at this changeset

1 file changed

modified company-english-helper.el +11 −5
@@ -175,11 +175,17 @@
175175 nil))
176176
177177 ;; Make prefix-match-candidates as first candidates, then suffix-match-candidates and fuzz-match-candidates.
178- (delete-dups (append
179- (subseq prefix-match-candidates 0 (min company-english-helper-match-group-size (length prefix-match-candidates)))
180- (subseq suffix-match-candidates 0 (min company-english-helper-match-group-size (length suffix-match-candidates)))
181- (subseq fuzz-match-candidates 0 (min company-english-helper-match-group-size (length fuzz-match-candidates)))
182- ))
178+ (delete-dups (if fuzz-match-candidates
179+ (append
180+ (subseq prefix-match-candidates 0 (min company-english-helper-match-group-size (length prefix-match-candidates)))
181+ (subseq suffix-match-candidates 0 (min company-english-helper-match-group-size (length suffix-match-candidates)))
182+ (subseq fuzz-match-candidates 0 (min company-english-helper-match-group-size (length fuzz-match-candidates)))
183+ )
184+ (append
185+ prefix-match-candidates
186+ suffix-match-candidates
187+ fuzz-match-candidates
188+ )))
183189 ))
184190 (annotation (english-helper-annotation arg))
185191 (sorted t)