branch: externals/company commit 5f5949b6ae8ea9df94c6cb3e01d9cae43623b794 Merge: 053c50d b16b236 Author: Dmitry Gutov <dgu...@yandex.ru> Commit: GitHub <nore...@github.com>
Merge pull request #1024 from hlissner/fix-face-helper Fix company--face-attribute for text-scaled faces --- company.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/company.el b/company.el index fb39fa8..09c2d46 100644 --- a/company.el +++ b/company.el @@ -2749,7 +2749,8 @@ If SHOW-VERSION is non-nil, show the version in the echo area." (defun company--face-attribute (face attr) ;; Like `face-attribute', but accounts for faces that have been remapped to ;; another face, a list of faces, or a face spec. - (cond ((symbolp face) + (cond ((null face) nil) + ((symbolp face) (let ((remap (cdr (assq face face-remapping-alist)))) (if remap (company--face-attribute @@ -2802,7 +2803,8 @@ If SHOW-VERSION is non-nil, show the version in the echo area." (let* ((nl-face (list :extend t :inverse-video nil - :background (company--face-attribute 'default :background))) + :background (or (company--face-attribute 'default :background) + (face-attribute 'default :background nil t)))) (str (apply #'concat (when nl " \n") (cl-mapcan