[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ELPA-diffs] [elpa] 05/14: Fix #43
From: |
emacs-devel |
Subject: |
[ELPA-diffs] [elpa] 05/14: Fix #43 |
Date: |
Tue, 14 Jan 2014 20:57:08 +0000 |
This is an automated email from the git hooks/post-receive script.
root pushed a commit to branch master
in repository elpa.
commit f4174bc6156a831a9a465c0f60da004e9997fa1a
Author: Dmitry Gutov <address@hidden>
Date: Mon Dec 23 12:46:38 2013 +0200
Fix #43
---
company-tests.el | 7 +++++++
company.el | 6 ++++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/company-tests.el b/company-tests.el
index 870ad2b..016e439 100644
--- a/company-tests.el
+++ b/company-tests.el
@@ -198,6 +198,13 @@
(should (string= (overlay-get ov 'company-after)
" 123\nc45 c\nddd\n")))))))
+(ert-deftest company-create-lines-shows-numbers ()
+ (let ((company-show-numbers t)
+ (company-candidates '("x" "y" "z"))
+ (company-candidates-length 3))
+ (should (equal '("x 1" "y 2" "z 3")
+ (company--create-lines 0 999)))))
+
(ert-deftest company-column-with-composition ()
(with-temp-buffer
(insert "lambda ()")
diff --git a/company.el b/company.el
index bee150c..0d3bb38 100644
--- a/company.el
+++ b/company.el
@@ -1773,8 +1773,10 @@ Example: \(company-begin-with '\(\"foo\" \"foobar\"
\"foobarbaz\"\)\)"
(dotimes (_ len)
(setq width (max (length (pop lines-copy)) width)))
- (setq width (min width (window-width)))
-
+ (setq width (min (window-width)
+ (if company-show-numbers
+ (+ 2 width)
+ width)))
(setq lines-copy lines)
;; number can make tooltip too long
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
- [ELPA-diffs] [elpa] branch master updated (25219bd -> e6d8543), emacs-devel, 2014/01/14
- [ELPA-diffs] [elpa] 10/14: * packages/company/company-etags.el: Require `cl' for `case'. * packages/company/company-oddmuse.el: Avoid `eval-when'., emacs-devel, 2014/01/14
- [ELPA-diffs] [elpa] 02/14: Add option to wrap around selection in popup, emacs-devel, 2014/01/14
- [ELPA-diffs] [elpa] 01/14: Include emacs22 in the Travis build again, emacs-devel, 2014/01/14
- [ELPA-diffs] [elpa] 03/14: company-elisp: enable in inferior-emacs-lisp-mode, emacs-devel, 2014/01/14
- [ELPA-diffs] [elpa] 05/14: Fix #43,
emacs-devel <=
- [ELPA-diffs] [elpa] 09/14: company-capf: Perform sorting before prefix adjustment, emacs-devel, 2014/01/14
- [ELPA-diffs] [elpa] 04/14: company--should-complete: Don't check if we're in minibuffer, emacs-devel, 2014/01/14
- [ELPA-diffs] [elpa] 08/14: Fix http://debbugs.gnu.org/16334, emacs-devel, 2014/01/14
- [ELPA-diffs] [elpa] 06/14: Require cl before using cl, emacs-devel, 2014/01/14
- [ELPA-diffs] [elpa] 11/14: Replace company-elisp with company-capf, emacs-devel, 2014/01/14
- [ELPA-diffs] [elpa] 13/14: Fix a broken test, remove a duplicate one, emacs-devel, 2014/01/14
- [ELPA-diffs] [elpa] 12/14: Close #45, emacs-devel, 2014/01/14
- [ELPA-diffs] [elpa] 07/14: Merge pull request #44 from dcolascione/master, emacs-devel, 2014/01/14
- [ELPA-diffs] [elpa] 14/14: Merge commit '67a96dbbfe645b64291ed62eab6f1eb391a834e0' from company, emacs-devel, 2014/01/14