branch: externals/company
commit 25f6a2717ade173c37dc4d013ce68312673596d7
Author: Dmitry Gutov <dgu...@yandex.ru>
Commit: Dmitry Gutov <dgu...@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