[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ELPA-diffs] [elpa] 01/05: company-capf: Use base-size returned by compl
From: |
Dmitry Gutov |
Subject: |
[ELPA-diffs] [elpa] 01/05: company-capf: Use base-size returned by completion-all-completions |
Date: |
Wed, 15 Jan 2014 05:34:18 +0000 |
This is an automated email from the git hooks/post-receive script.
dgutov pushed a commit to branch master
in repository elpa.
commit debb87fa0cdbfacb67d9a31bedd78a3aa79e824b
Author: Dmitry Gutov <address@hidden>
Date: Wed Jan 15 03:01:06 2014 +0200
company-capf: Use base-size returned by completion-all-completions
Thanks to Stefan for the tip
---
company-capf.el | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/company-capf.el b/company-capf.el
index 21b9214..2fcfbfb 100644
--- a/company-capf.el
+++ b/company-capf.el
@@ -57,15 +57,15 @@ Requires Emacs 24.1 or newer."
(buffer-substring (nth 1 res) (nth 2 res))
table pred))
(sortfun (cdr (assq 'display-sort-function meta)))
- (boundaries (completion-boundaries arg table pred ""))
(candidates (completion-all-completions arg table pred (length
arg)))
- (last (last candidates 1)))
- (when (numberp (cdr last))
+ (last (last candidates))
+ (base-size (and (numberp (cdr last)) (cdr last))))
+ (when base-size
(setcdr last nil))
(when sortfun
(setq candidates (funcall sortfun candidates)))
- (if (not (zerop (car boundaries)))
- (let ((before (substring arg 0 (car boundaries))))
+ (if (not (zerop (or base-size 0)))
+ (let ((before (substring arg 0 base-size)))
(mapcar (lambda (candidate)
(concat before candidate))
candidates))
--
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 <=
- [ELPA-diffs] [elpa] 03/05: If there's just one candidate, set company-common to it, Dmitry Gutov, 2014/01/15
- [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