emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master e5177c9 105/173: Add company-tooltip-annotation-selection


From: Dmitry Gutov
Subject: [elpa] master e5177c9 105/173: Add company-tooltip-annotation-selection face
Date: Thu, 23 Jun 2016 00:28:42 +0000 (UTC)

branch: master
commit e5177c91887dda193309a60c4096533ce76352f1
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    Add company-tooltip-annotation-selection face
    
    #445
---
 NEWS.md    |    2 ++
 company.el |   10 ++++++++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/NEWS.md b/NEWS.md
index 6fa729c..af75ccb 100644
--- 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
diff --git a/company.el b/company.el
index bd5bb35..95eac25 100644
--- a/company.el
+++ b/company.el
@@ -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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]