[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 946c798 095/173: Handle empty list of candidates
From: |
Dmitry Gutov |
Subject: |
[elpa] master 946c798 095/173: Handle empty list of candidates |
Date: |
Thu, 23 Jun 2016 00:28:41 +0000 (UTC) |
branch: master
commit 946c798dfc19047ae3cebe63d00db84ec525a9bc
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
Handle empty list of candidates
---
company.el | 2 +-
test/core-tests.el | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/company.el b/company.el
index 8d416de..498920a 100644
--- a/company.el
+++ b/company.el
@@ -1239,7 +1239,7 @@ can retrieve meta-data for them."
(push anno2 annos)
(push str res) ; Maintain ordering.
(setq str str2)))))
- (push str res)
+ (when str (push str res))
(nreverse res)))
(defun company--transform-candidates (candidates)
diff --git a/test/core-tests.el b/test/core-tests.el
index dcadfd3..46d1709 100644
--- a/test/core-tests.el
+++ b/test/core-tests.el
@@ -399,6 +399,9 @@
(and (ert-equal-including-properties (car list1) (car list2))
(ct-equal-including-properties (cdr list1) (cdr list2)))))
+(ert-deftest company-strips-duplicates-returns-nil ()
+ (should (null (company--preprocess-candidates nil))))
+
(ert-deftest company-strips-duplicates-within-groups ()
(let* ((kvs '(("a" . "b")
("a" . nil)
- [elpa] master 5e29e41 003/173: company-files--grab-existing-name: Check if the file is remote, (continued)
- [elpa] master 5e29e41 003/173: company-files--grab-existing-name: Check if the file is remote, Dmitry Gutov, 2016/06/22
- [elpa] master 7579ced 055/173: Fix a bug reference, Dmitry Gutov, 2016/06/22
- [elpa] master 05987e6 056/173: Fix #362 (arbitrary jumping of point), Dmitry Gutov, 2016/06/22
- [elpa] master 679846a 065/173: Makefile: allow package and elpa targets to run without git, Dmitry Gutov, 2016/06/22
- [elpa] master 33f7bbc 077/173: Fix some compilation warnings, Dmitry Gutov, 2016/06/22
- [elpa] master d39b956 059/173: Introduce company-indent-or-complete-common, Dmitry Gutov, 2016/06/22
- [elpa] master 478f124 087/173: company-dabbrev-code-modes: Improve Customize labels, Dmitry Gutov, 2016/06/22
- [elpa] master 4a6eea9 089/173: Use company-dabbrev-char-regexp more consistently (#433), Dmitry Gutov, 2016/06/22
- [elpa] master a3858be 086/173: Ignore trigger key prefixes that are shorter than symbol-at-point, Dmitry Gutov, 2016/06/22
- [elpa] master 3726fe2 093/173: [ci skip] Use the "generic" language, Dmitry Gutov, 2016/06/22
- [elpa] master 946c798 095/173: Handle empty list of candidates,
Dmitry Gutov <=
- [elpa] master c656b25 079/173: Merge pull request #418 from PythonNut/master, Dmitry Gutov, 2016/06/22
- [elpa] master 931e758 101/173: Fix the workaround, Dmitry Gutov, 2016/06/22
- [elpa] master 049b0e6 048/173: company--begin-new: Check the value of c, Dmitry Gutov, 2016/06/22
- [elpa] master 250ca1c 088/173: Add company-etags-everywhere, Dmitry Gutov, 2016/06/22
- [elpa] master 21da29b 082/173: Update copyright, Dmitry Gutov, 2016/06/22
- [elpa] master cec8779 075/173: Introduce company-search-regexp-function, Dmitry Gutov, 2016/06/22
- [elpa] master 6165cb2 083/173: Don't "adjust key" (#422), Dmitry Gutov, 2016/06/22
- [elpa] master e5177c9 105/173: Add company-tooltip-annotation-selection face, Dmitry Gutov, 2016/06/22
- [elpa] master 75e21f6 045/173: company-css: Support web-mode, Dmitry Gutov, 2016/06/22
- [elpa] master e6ea779 004/173: Add `company-diag', Dmitry Gutov, 2016/06/22