[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ivy-hydra e1cfd32 052/395: ivy.el (ivy-use-group-face-i
From: |
Basil L. Contovounesios |
Subject: |
[elpa] externals/ivy-hydra e1cfd32 052/395: ivy.el (ivy-use-group-face-if-no-groups): New defcustom |
Date: |
Thu, 25 Feb 2021 08:31:29 -0500 (EST) |
branch: externals/ivy-hydra
commit e1cfd328cdcdde926a733600325a5b924586885d
Author: Ingo Lohmar <ingo.lohmar@posteo.net>
Commit: Oleh Krehel <ohwoeowho@gmail.com>
ivy.el (ivy-use-group-face-if-no-groups): New defcustom
Fixes #2324.
Simplify the logic which face is used for what part of the minibuffer
matches.
This only applies to highlighting functions that highlight the whole
match.
---
ivy.el | 11 ++++++++++-
swiper.el | 2 +-
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/ivy.el b/ivy.el
index 343ba77..35dec60 100644
--- a/ivy.el
+++ b/ivy.el
@@ -3866,6 +3866,14 @@ Note: The usual last two arguments are flipped for
convenience.")
(cons (flx-score str flx-name ivy--flx-cache) str)))
(ivy--highlight-default str)))
+(defcustom ivy-use-group-face-if-no-groups t
+ "If t, and the expression has no subgroups, highlight whole match as a group.
+
+It will then use the second face (first of the \"group\" faces)
+of `ivy-minibuffer-faces'. Otherwise, always use the first face
+in this case."
+ :type 'boolean)
+
(defun ivy--highlight-default (str)
"Highlight STR, using the default method."
(unless ivy--old-re
@@ -3890,7 +3898,8 @@ Note: The usual last two arguments are flipped for
convenience.")
(unless (and prev (= prev beg))
(cl-incf n))
(let ((face
- (cond ((zerop ivy--subexps)
+ (cond ((and ivy-use-group-face-if-no-groups
+ (zerop ivy--subexps))
(cadr ivy-minibuffer-faces))
((zerop i)
(car ivy-minibuffer-faces))
diff --git a/swiper.el b/swiper.el
index 3f2ec3c..21ddb8e 100644
--- a/swiper.el
+++ b/swiper.el
@@ -1036,7 +1036,7 @@ WND, when specified is the window."
(unless (> (- me mb) 2017)
(funcall adder-fn
mb me
- (if (zerop ivy--subexps)
+ (if (and ivy-use-group-face-if-no-groups (zerop ivy--subexps))
(nth (1+ (mod (or re-idx 0) (1- (length faces)))) faces)
(car faces))
0)))
- [elpa] externals/ivy-hydra ad00c47 039/395: swiper.el (swiper--re-builder): Treat "\n" in input as a newline, (continued)
- [elpa] externals/ivy-hydra ad00c47 039/395: swiper.el (swiper--re-builder): Treat "\n" in input as a newline, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 64d18d1 002/395: counsel.el (counsel-ag): Respect case sensitivity settings, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra b0029ca 010/395: Make casefold settings for counsel-git-grep work., Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra a2a3263 014/395: ivy.el (ivy-initial-inputs-alist): Add default behavior, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 2fe64cd 036/395: swiper.el (swiper--isearch-highlight): Don't hang on empty match data, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra f50104c 021/395: ivy.el (ivy--cd-maybe): Exit with 'no-update-history, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 3b35b45 015/395: counsel.el (counsel-ack): Fix, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 47e5046 027/395: swiper.el (swiper--isearch-function-1): Don't skip match at eobp, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 43daeb1 029/395: counsel.el (counsel-git-grep): Set :require-match to t in `ivy-read', Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra d28cd03 048/395: ivy.el (file-local-name): Define unless already defined, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra e1cfd32 052/395: ivy.el (ivy-use-group-face-if-no-groups): New defcustom,
Basil L. Contovounesios <=
- [elpa] externals/ivy-hydra 4f81b22 006/395: counsel.el (counsel-search-engines-alist): Fix, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 096ff2a 020/395: counsel.el: Fix compiler warning, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 6ed0ad4 032/395: counsel.el (counsel-ag): Set :require-match to t., Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 03fb20e 033/395: ivy.el (ivy-help): Insert "describe-mode" outline, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 66a8b1b 031/395: ivy.el (ivy--reset-state): Bind ivy-recursive-restore to nil, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 76057b1 035/395: ivy-test.el (ivy--split): Add test, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra a6d80c1 003/395: counsel.el (counsel-git-grep-cmd-default): Do not include --full-name, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra c6f6f9a 005/395: ivy-overlay.el (ivy-overlay-show-after): Improve available-height calculation, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra c8120fb 016/395: counsel.el (counsel-cd): Add counsel-delete-process, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 1578f52 022/395: ivy.el: Autoload ivy-hydra-read-action, Basil L. Contovounesios, 2021/02/25