]> code.delx.au - gnu-emacs-elpa/commitdiff
Add company-tooltip-annotation-selection face
authorDmitry Gutov <dgutov@yandex.ru>
Sun, 3 Jan 2016 15:00:15 +0000 (17:00 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Sun, 3 Jan 2016 15:00:15 +0000 (17:00 +0200)
#445

NEWS.md
company.el

diff --git a/NEWS.md b/NEWS.md
index 6fa729cf838e4602b46776f92079482a7ab29556..af75ccb6ad659208b2e3247c2ce971378e031ac6 100644 (file)
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,6 +2,8 @@
 
 ## Next
 
+* New face `company-tooltip-annotation-selection`, used for the annotation in
+  the selected tooltip line.
 * `company-clang-objc-templatify` has been renamed to
   `company-template-objc-templatify`.
 * When duplicates are removed, completions without annotations are also removed
index bd5bb355b9f7a6bc8982b8b6291fa4beec5188a9..95eac25070a70395bb4888f24cedcee1f42a177b 100644 (file)
@@ -132,7 +132,11 @@ buffer-local wherever it is set."
      :foreground "firebrick4")
     (((background dark))
      :foreground "red4"))
-  "Face used for the annotation in the tooltip.")
+  "Face used for the completion annotation in the tooltip.")
+
+(defface company-tooltip-annotation-selection
+  '((default :inherit company-tooltip-annotation))
+  "Face used for the selected completion annotation in the tooltip.")
 
 (defface company-scrollbar-fg
   '((((background light))
@@ -2372,7 +2376,9 @@ If SHOW-VERSION is non-nil, show the version in the echo area."
                                     line)
     (when (< ann-start ann-end)
       (font-lock-append-text-property ann-start ann-end 'face
-                                      'company-tooltip-annotation
+                                      (if selected
+                                          'company-tooltip-annotation-selection
+                                        'company-tooltip-annotation)
                                       line))
     (font-lock-prepend-text-property margin common 'face
                                      (if selected