kikocis/company-english-helper public
Changesets · Branches · Tags · Compare
| Changeset | 0c0cc64b5ec1875946f7f070ce14ffd5293bd8f85e89c9ee9efe69ed1ae99320 |
|---|---|
| Author | Andy Stewart <lazycat.manatee@gmail.com> · 2018-09-14 23:50 +08:00 |
| Committer | Andy Stewart <lazycat.manatee@gmail.com> · 2018-09-14 23:50 +08:00 |
| Parents | b9b9ce6a2975 |
1 file changed
modified company-english-helper.el +11 −5
| @@ -175,11 +175,17 @@ | ||
| 175 | 175 | nil)) |
| 176 | 176 | |
| 177 | 177 | ;; 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 | + ))) | |
| 183 | 189 | )) |
| 184 | 190 | (annotation (english-helper-annotation arg)) |
| 185 | 191 | (sorted t) |