;; Author: Nikolaj Schumacher
;; Maintainer: Dmitry Gutov <dgutov@yandex.ru>
;; 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"))
(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.
(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))
" 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