[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 525a19d 14/18: Propertize directories with ivy-subdir face
From: |
Oleh Krehel |
Subject: |
[elpa] master 525a19d 14/18: Propertize directories with ivy-subdir face |
Date: |
Mon, 20 Apr 2015 12:39:08 +0000 |
branch: master
commit 525a19d139b62464ac0872f89d498252446799a0
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
Propertize directories with ivy-subdir face
* ivy.el (ivy-subdir): New defface.
(ivy-completions): Update.
---
ivy.el | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/ivy.el b/ivy.el
index 3d40b64..784ef0b 100644
--- a/ivy.el
+++ b/ivy.el
@@ -46,6 +46,10 @@
'((t (:inherit highlight)))
"Face used by Ivy for highlighting first match.")
+(defface ivy-subdir
+ '((t (:weight bold)))
+ "Face used by Ivy for highlighting subdirs in the alternatives.")
+
(defcustom ivy-height 10
"Number of lines for the minibuffer window."
:type 'integer)
@@ -606,6 +610,12 @@ CANDIDATES is a list of strings."
(end (min (+ start (1- ivy-height)) ivy--length))
(cands (cl-subseq cands start end))
(index (min ivy--index half-height (1- (length cands)))))
+ (when ivy--directory
+ (setq cands (mapcar (lambda (x)
+ (if (string-match-p "/$" x)
+ (propertize x 'face 'ivy-subdir)
+ x))
+ cands)))
(setq ivy--current (copy-sequence (nth index cands)))
(setf (nth index cands)
(ivy--add-face ivy--current 'ivy-current-match))
- [elpa] master f5a32bf 04/18: Add a command to grep the current git repo, (continued)
- [elpa] master f5a32bf 04/18: Add a command to grep the current git repo, Oleh Krehel, 2015/04/20
- [elpa] master 9f21e1d 06/18: Add a matching optimization, Oleh Krehel, 2015/04/20
- [elpa] master a9a4e81 05/18: counsel.el (counsel-git-grep): Fix the default-directory, Oleh Krehel, 2015/04/20
- [elpa] master 539fe7d 07/18: ivy.el (ivy-completions): Fix an optimization, Oleh Krehel, 2015/04/20
- [elpa] master 23c0e6a 08/18: ivy.el (ivy-done): Update for non-matching file names, Oleh Krehel, 2015/04/20
- [elpa] master a94ca83 01/18: swiper.el: Add a work-around for window-start not being current, Oleh Krehel, 2015/04/20
- [elpa] master cafcfb9 10/18: Allow "C-." to jump to current symbol definition, Oleh Krehel, 2015/04/20
- [elpa] master d0f3826 11/18: ivy.el (ivy--preselect-index): Give priority to perfect match, Oleh Krehel, 2015/04/20
- [elpa] master 297008b 09/18: Allow to customize the file sorting order, Oleh Krehel, 2015/04/20
- [elpa] master 3282f78 13/18: Speed up the default file sorting even more, Oleh Krehel, 2015/04/20
- [elpa] master 525a19d 14/18: Propertize directories with ivy-subdir face,
Oleh Krehel <=
- [elpa] master 10af5a6 16/18: ivy.el (ivy-done): Still expand "./" though, Oleh Krehel, 2015/04/20
- [elpa] master e71e4d2 12/18: Speed up the default file sorting, Oleh Krehel, 2015/04/20
- [elpa] master 61a95c4 15/18: Don't expand the default when completing file names, Oleh Krehel, 2015/04/20
- [elpa] master efa18ec 17/18: swiper.el: Bump version, Oleh Krehel, 2015/04/20
- [elpa] master 2f4c2c1 18/18: Merge commit 'efa18eca10e5a0e05043f872cf9945842bb3a034' from swiper, Oleh Krehel, 2015/04/20