emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/company 25f6a27 26/46: company-echo-format: Handle comp


From: Dmitry Gutov
Subject: [elpa] externals/company 25f6a27 26/46: company-echo-format: Handle company-common being nil
Date: Wed, 30 Dec 2020 18:33:07 -0500 (EST)

branch: externals/company
commit 25f6a2717ade173c37dc4d013ce68312673596d7
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>

    company-echo-format: Handle company-common being nil
---
 company.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/company.el b/company.el
index 1dd389d..c6847b5 100644
--- a/company.el
+++ b/company.el
@@ -3238,10 +3238,12 @@ Delay is determined by `company-tooltip-idle-delay'."
                                      'face 'company-echo))
               (cl-incf len 3)
               (cl-incf i)
-              (add-text-properties 3 (+ 3 (string-width company-common))
+              ;; FIXME: Add support for the `match' backend action, and thus,
+              ;; non-prefix matches.
+              (add-text-properties 3 (+ 3 (string-width (or company-common 
"")))
                                    '(face company-echo-common) comp))
           (setq comp (propertize comp 'face 'company-echo))
-          (add-text-properties 0 (string-width company-common)
+          (add-text-properties 0 (string-width (or company-common ""))
                                '(face company-echo-common) comp))
         (if (>= len limit)
             (setq candidates nil)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]