branch: master
commit 97abd3c25c657630ba5bd9df2d6f421dd6356cea
Author: Oleh Krehel <ohwoeo...@gmail.com>
Commit: Oleh Krehel <ohwoeo...@gmail.com>

    ivy.el (ivy-virtual): New defface
    
    * ivy.el (ivy--virtual-buffers): Use `ivy-virtual'.
    No need for `ido-use-faces' approach, the user can just customize
    `ivy-virtual' to look like `default' if needed.
    
    Fixes #129
---
 ivy.el |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/ivy.el b/ivy.el
index 697f854..193dd09 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1193,7 +1193,9 @@ CANDS is a list of strings."
   "Store the virtual buffers alist.")
 
 (defvar recentf-list)
-(defvar ido-use-faces)
+
+(defface ivy-virtual '((t :inherit font-lock-builtin-face))
+  "Face used by Ivy for matching virtual buffer names.")
 
 (defun ivy--virtual-buffers ()
   "Adapted from `ido-add-virtual-buffers-to-list'."
@@ -1218,11 +1220,10 @@ CANDS is a list of strings."
            (not (assoc name virtual-buffers))
            (push (cons name head) virtual-buffers)))
     (when virtual-buffers
-      (if ido-use-faces
-          (dolist (comp virtual-buffers)
-            (put-text-property 0 (length (car comp))
-                               'face 'ido-virtual
-                               (car comp))))
+      (dolist (comp virtual-buffers)
+        (put-text-property 0 (length (car comp))
+                           'face 'ivy-virtual
+                           (car comp)))
       (setq ivy--virtual-buffers (nreverse virtual-buffers))
       (mapcar #'car ivy--virtual-buffers))))
 

Reply via email to