[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ELPA-diffs] [elpa] 03/05: If there's just one candidate, set company-co
From: |
Dmitry Gutov |
Subject: |
[ELPA-diffs] [elpa] 03/05: If there's just one candidate, set company-common to it |
Date: |
Wed, 15 Jan 2014 05:34:19 +0000 |
This is an automated email from the git hooks/post-receive script.
dgutov pushed a commit to branch master
in repository elpa.
commit da7ac3d9b11f02adc538244821dd8db66d0eba8e
Author: Dmitry Gutov <address@hidden>
Date: Wed Jan 15 05:06:21 2014 +0200
If there's just one candidate, set company-common to it
---
company.el | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/company.el b/company.el
index 5d1355e..ae2ec51 100644
--- a/company.el
+++ b/company.el
@@ -833,8 +833,11 @@ can retrieve meta-data for them."
;; responsibility of each respective backend, not ours.
;; On the other hand, we don't want to replace non-prefix input in
;; `company-complete-common'.
- (setq company-common (company--safe-candidate
- (try-completion company-prefix
company-candidates)))))
+ (setq company-common
+ (if (cdr company-candidates)
+ (company--safe-candidate
+ (try-completion company-prefix company-candidates))
+ (car company-candidates)))))
(defun company--safe-candidate (str)
(or (company-call-backend 'crop str)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
- [ELPA-diffs] [elpa] branch master updated (2b96305 -> 4cf8c95), Dmitry Gutov, 2014/01/15
- [ELPA-diffs] [elpa] 01/05: company-capf: Use base-size returned by completion-all-completions, Dmitry Gutov, 2014/01/15
- [ELPA-diffs] [elpa] 03/05: If there's just one candidate, set company-common to it,
Dmitry Gutov <=
- [ELPA-diffs] [elpa] 05/05: Merge commit '8b4d7da0d6aa1e24379fe5ace5bd2705352ea07e' from company, Dmitry Gutov, 2014/01/15
- [ELPA-diffs] [elpa] 02/05: company-capf: Highlight the "common" part, Dmitry Gutov, 2014/01/15
- [ELPA-diffs] [elpa] 04/05: Release 0.6.13, Dmitry Gutov, 2014/01/15