[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 75f578e 2/7: company--create-lines: Handle keep-prefix wit
From: |
Dmitry Gutov |
Subject: |
[elpa] master 75f578e 2/7: company--create-lines: Handle keep-prefix with multiple-width chars in prefix |
Date: |
Thu, 22 Jan 2015 23:06:52 +0000 |
branch: master
commit 75f578ee635b1f61246569cbef0e466be1dba803
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
company--create-lines: Handle keep-prefix with multiple-width chars in
prefix
---
company.el | 6 +++---
test/frontends-tests.el | 14 ++++++++++++++
2 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/company.el b/company.el
index 9658006..005413b 100644
--- a/company.el
+++ b/company.el
@@ -5,7 +5,7 @@
;; Author: Nikolaj Schumacher
;; Maintainer: Dmitry Gutov <address@hidden>
;; URL: http://company-mode.github.io/
-;; Version: 0.8.8
+;; Version: 0.8.9-cvs
;; Keywords: abbrev, convenience, matching
;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
@@ -2372,7 +2372,7 @@ If SHOW-VERSION is non-nil, show the version in the echo
area."
(dotimes (_ len)
(let* ((value (pop lines-copy))
(annotation (company-call-backend 'annotation value)))
- (setq value (company--clean-string value))
+ (setq value (company--clean-string (company-reformat value)))
(when annotation
(when company-tooltip-align-annotations
;; `lisp-completion-at-point' adds a space.
@@ -2399,7 +2399,7 @@ If SHOW-VERSION is non-nil, show the version in the echo
area."
(dotimes (i len)
(let* ((item (pop items))
- (str (company-reformat (car item)))
+ (str (car item))
(annotation (cdr item))
(right (company-space-string company-tooltip-margin))
(width width))
diff --git a/test/frontends-tests.el b/test/frontends-tests.el
index a10f914..35c94c9 100644
--- a/test/frontends-tests.el
+++ b/test/frontends-tests.el
@@ -231,6 +231,20 @@
" b ︸︸ ")
(company--create-lines 0 999)))))
+(ert-deftest company-create-lines-with-multiple-width-and-keep-prefix ()
+ :tags '(interactive)
+ (let* (company-show-numbers
+ (company-candidates '("MIRAI発売1カ月"
+ "MIRAI発売2カ月"))
+ (company-candidates-length 2)
+ (company-prefix "MIRAI発")
+ (company-backend (lambda (c &optional _arg)
+ (pcase c
+ (`ignore-case 'keep-prefix)))))
+ (should (equal '(" MIRAI発売1カ月 "
+ " MIRAI発売2カ月 ")
+ (company--create-lines 0 999)))))
+
(ert-deftest company-column-with-composition ()
:tags '(interactive)
(with-temp-buffer
- [elpa] master updated (ca6142f -> c7f675e), Dmitry Gutov, 2015/01/22
- [elpa] master 78e8d0a 3/7: company-ispell: Filter returned candidates locally, Dmitry Gutov, 2015/01/22
- [elpa] master 75f578e 2/7: company--create-lines: Handle keep-prefix with multiple-width chars in prefix,
Dmitry Gutov <=
- [elpa] master 9c60a4f 4/7: Update copyright years, Dmitry Gutov, 2015/01/22
- [elpa] master d27bdf6 5/7: Add company-next-page and company-previous-page, Dmitry Gutov, 2015/01/22
- [elpa] master a4ac0de 6/7: Bump the version, Dmitry Gutov, 2015/01/22
- [elpa] master c7f675e 7/7: Merge commit 'a4ac0dead8e9cb440c1f8aec9141d6c64bad4933' from company, Dmitry Gutov, 2015/01/22
- [elpa] master 7c02be2 1/7: * packages/company/test/clang-tests.el: Add copyright notice, Dmitry Gutov, 2015/01/22