[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/company 8c22b58 28/46: Merge pull request #1020 from hl
From: |
Dmitry Gutov |
Subject: |
[elpa] externals/company 8c22b58 28/46: Merge pull request #1020 from hlissner/fix-tooltip-bg |
Date: |
Wed, 30 Dec 2020 18:33:08 -0500 (EST) |
branch: externals/company
commit 8c22b58a01ba5f571bff112fadfc51046473fcc1
Merge: 25f6a27 bbff400
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: GitHub <noreply@github.com>
Merge pull request #1020 from hlissner/fix-tooltip-bg
Fix tooltip background stretching to EOL
---
company.el | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/company.el b/company.el
index c6847b5..b4e40c2 100644
--- a/company.el
+++ b/company.el
@@ -2746,6 +2746,22 @@ If SHOW-VERSION is non-nil, show the version in the echo
area."
(cl-decf ww (1- (length (aref buffer-display-table ?\n)))))
ww))
+(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)
+ (let ((remap (cadr (assq face face-remapping-alist))))
+ (if remap
+ (company--face-attribute remap attr)
+ (face-attribute face attr nil t))))
+ ((keywordp (car-safe face))
+ (or (plist-get face attr)
+ (company--face-attribute (plist-get face :inherit))))
+ ((listp face)
+ (cl-find-if #'stringp
+ (mapcar (lambda (f) (company--face-attribute f attr))
+ face)))))
+
(defun company--replacement-string (lines old column nl &optional align-top)
(cl-decf column company-tooltip-margin)
@@ -2782,7 +2798,7 @@ If SHOW-VERSION is non-nil, show the version in the echo
area."
(let* ((nl-face (list
:extend t
:inverse-video nil
- :background (face-attribute 'default :background)))
+ :background (company--face-attribute 'default
:background)))
(str (apply #'concat
(when nl " \n")
(cl-mapcan
- [elpa] externals/company 520978c 02/46: Change the replacement character for non-printables, (continued)
- [elpa] externals/company 520978c 02/46: Change the replacement character for non-printables, Dmitry Gutov, 2020/12/30
- [elpa] externals/company 1b985d1 03/46: Set project-vc-merge-submodules to nil [ci skip], Dmitry Gutov, 2020/12/30
- [elpa] externals/company 664dd19 05/46: Move company-clang to after company-capf, Dmitry Gutov, 2020/12/30
- [elpa] externals/company 54f60ef 14/46: Print the right buffer-local value, Dmitry Gutov, 2020/12/30
- [elpa] externals/company 63b0535 15/46: Fixed badge url., Dmitry Gutov, 2020/12/30
- [elpa] externals/company d6df27f 17/46: Rename auto-complete to auto-commit, Dmitry Gutov, 2020/12/30
- [elpa] externals/company 805637c 24/46: company-cmake: property completion candidates, Dmitry Gutov, 2020/12/30
- [elpa] externals/company c1e8972 18/46: company-selection: add company-selection-default to have better support for non-selection popup, Dmitry Gutov, 2020/12/30
- [elpa] externals/company 25f6a27 26/46: company-echo-format: Handle company-common being nil, Dmitry Gutov, 2020/12/30
- [elpa] externals/company bbff400 27/46: Fix tooltip background stretching to EOL, Dmitry Gutov, 2020/12/30
- [elpa] externals/company 8c22b58 28/46: Merge pull request #1020 from hlissner/fix-tooltip-bg,
Dmitry Gutov <=
- [elpa] externals/company 5f5949b 33/46: Merge pull request #1024 from hlissner/fix-face-helper, Dmitry Gutov, 2020/12/30
- [elpa] externals/company dd92593 35/46: Merge pull request #1032 from kiennq/bug/company-selection-offset, Dmitry Gutov, 2020/12/30
- [elpa] externals/company 97cfbc3 37/46: Merge pull request #1033 from edwargix/master, Dmitry Gutov, 2020/12/30
- [elpa] externals/company e1726c4 22/46: Typo, Dmitry Gutov, 2020/12/30
- [elpa] externals/company 4462e7d 16/46: Merge pull request #1004 from jcs-PR/fix-badge, Dmitry Gutov, 2020/12/30
- [elpa] externals/company 18b7b79 29/46: Fix company--face-attribute helper, Dmitry Gutov, 2020/12/30
- [elpa] externals/company bea3195 36/46: Implement `company-select-first' and `company-select-last', Dmitry Gutov, 2020/12/30
- [elpa] externals/company 13e2ada 39/46: Avoid calling executable-find for local buffers., Dmitry Gutov, 2020/12/30
- [elpa] externals/company 0edc87d 23/46: Fix a couple of warnings, Dmitry Gutov, 2020/12/30
- [elpa] externals/company c4d205a 31/46: Fix company--face-attribute for text-scaled faces, Dmitry Gutov, 2020/12/30