]> code.delx.au - gnu-emacs-elpa/commitdiff
Fixed lighter for grouped backends
authorAkira Kyle <akyle@cmu.edu>
Sun, 20 Mar 2016 03:52:53 +0000 (23:52 -0400)
committerAkira Kyle <akyle@cmu.edu>
Sun, 20 Mar 2016 03:52:53 +0000 (23:52 -0400)
Fixed issue where if the car of company-backend was a keyword (eg :sorted) the lighter would display that instead of the correct backend. (I believe this necessary due to the "small perf optimization" in company--multi-backend-adapter-candidates

company.el

index 9756402ec71d3c7afe2d9f978e2b425c4cb3dec2..5212f927e30286df3447ca48941ea450e379ec8e 100644 (file)
@@ -1096,7 +1096,8 @@ can retrieve meta-data for them."
 
 (defun company--group-lighter (candidate base)
   (let ((backend (or (get-text-property 0 'company-backend candidate)
-                     (car company-backend))))
+                     (cl-some (lambda (x) (and (not (keywordp x)) x))
+                              company-backend))))
     (when (and backend (symbolp backend))
       (let ((name (replace-regexp-in-string "company-\\|-company" ""
                                             (symbol-name backend))))