[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ivy-hydra d539306 307/395: Revert "ivy.el (ivy-display-
From: |
Basil L. Contovounesios |
Subject: |
[elpa] externals/ivy-hydra d539306 307/395: Revert "ivy.el (ivy-display-style): Remove" |
Date: |
Thu, 25 Feb 2021 08:32:26 -0500 (EST) |
branch: externals/ivy-hydra
commit d539306d6a83057c9930721555d27ef9827ecf13
Author: Oleh Krehel <ohwoeowho@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>
Revert "ivy.el (ivy-display-style): Remove"
This reverts commit a4a22e0755a9a7155e5bc8fd88ac0db03889d135.
Fixes #2570
---
doc/ivy.org | 7 +++++++
doc/ivy.texi | 8 ++++++++
ivy.el | 29 +++++++++++++++++++++--------
3 files changed, 36 insertions(+), 8 deletions(-)
diff --git a/doc/ivy.org b/doc/ivy.org
index 6149670..20a5e7e 100644
--- a/doc/ivy.org
+++ b/doc/ivy.org
@@ -809,6 +809,13 @@ installed.
The =format=-style switches this variable uses are described
in the =format= documentation.
+- User Option =ivy-display-style= ::
+ Specifies highlighting candidates in the minibuffer.
+
+ The default setting is ='fancy= in Emacs versions 24.4 or newer.
+
+ Set =ivy-display-style= to =nil= for a plain minibuffer.
+
- User Option =ivy-on-del-error-function= ::
Specifies what to do when ~DEL~ (=ivy-backward-delete-char=) fails.
diff --git a/doc/ivy.texi b/doc/ivy.texi
index 3b0ed19..24a1f89 100644
--- a/doc/ivy.texi
+++ b/doc/ivy.texi
@@ -1082,6 +1082,14 @@ The @code{format}-style switches this variable uses are
described
in the @code{format} documentation.
@end defopt
+@defopt ivy-display-style
+Specifies highlighting candidates in the minibuffer.
+
+The default setting is @code{'fancy} in Emacs versions 24.4 or newer.
+
+Set @code{ivy-display-style} to @code{nil} for a plain minibuffer.
+@end defopt
+
@defopt ivy-on-del-error-function
Specifies what to do when @kbd{DEL} (@code{ivy-backward-delete-char}) fails.
diff --git a/ivy.el b/ivy.el
index aee0d36..1bc6d9e 100644
--- a/ivy.el
+++ b/ivy.el
@@ -83,6 +83,17 @@ Set this to \"(%d/%d) \" to display both the index and the
count."
"When non-nil, wrap around after the first and the last candidate."
:type 'boolean)
+(defcustom ivy-display-style 'fancy
+ "The style for formatting the minibuffer.
+
+By default, the matched strings are copied as is.
+
+The fancy display style highlights matching parts of the regexp,
+a behavior similar to `swiper'."
+ :type '(choice
+ (const :tag "Plain" nil)
+ (const :tag "Fancy" fancy)))
+
(defcustom ivy-on-del-error-function #'abort-recursive-edit
"Function to call when deletion fails during completion.
The usual reason for `ivy-backward-delete-char' to fail is when
@@ -3971,14 +3982,16 @@ in this case."
(defun ivy--format-minibuffer-line (str)
"Format line STR for use in minibuffer."
(let* ((str (ivy-cleanup-string (copy-sequence str)))
- (str (if (memq (ivy-state-caller ivy-last)
- ivy-highlight-grep-commands)
- (let* ((start (if (string-match "\\`[^:]+:\\(?:[^:]+:\\)?"
str)
- (match-end 0) 0))
- (file (substring str 0 start))
- (match (substring str start)))
- (concat file (funcall ivy--highlight-function match)))
- (funcall ivy--highlight-function str)))
+ (str (if (eq ivy-display-style 'fancy)
+ (if (memq (ivy-state-caller ivy-last)
+ ivy-highlight-grep-commands)
+ (let* ((start (if (string-match
"\\`[^:]+:\\(?:[^:]+:\\)?" str)
+ (match-end 0) 0))
+ (file (substring str 0 start))
+ (match (substring str start)))
+ (concat file (funcall ivy--highlight-function match)))
+ (funcall ivy--highlight-function str))
+ str))
(olen (length str))
(annot (plist-get completion-extra-properties :annotation-function)))
(add-text-properties
- [elpa] externals/ivy-hydra d8ed11e 388/395: Make ivy-switch-buffer-kill respect current predicate, (continued)
- [elpa] externals/ivy-hydra d8ed11e 388/395: Make ivy-switch-buffer-kill respect current predicate, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra c1a61dc 084/395: ivy-test.el (ivy-empty-directory-open): Test opening empty directory, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 316d4dd 232/395: counsel-kmacro: Create actions for cycling the ring and setting a saved counter value., Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 38c90e8 196/395: ivy.el (ivy-switch-buffer-transformer): Move ivy-remote logic here, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra fff899a 237/395: counsel.el (counsel--sync-sentinel-on-exit): Try not to reset index to 0, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra a2c86c0 273/395: ivy.el (ivy-completion-in-region): Fixup, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra da0b272 281/395: ivy.el (ivy--call-marked): Handle alists, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra a37ec22 279/395: Revert "ivy.el (ivy--update-minibuffer): don't filter while there's input", Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 05d892d 282/395: counsel-grep/ag/rg/pt: use subprocess instead of shell command, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra b173441 326/395: Fix for ivy-immediate-done with counsel-M-x, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra d539306 307/395: Revert "ivy.el (ivy-display-style): Remove",
Basil L. Contovounesios <=
- [elpa] externals/ivy-hydra 1095e42 298/395: ivy.el (ivy-alt-done-functions-alist): Add, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 7774867 335/395: Guard against null Org heading, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 7b9391f 320/395: ivy-avy.el: Fix typo, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 6bfada5 359/395: ivy.el: Use ivy--completing-fname-p more, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 7e4c567 350/395: Makefile: Make plain.el load counsel instead of here, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 5db2513 341/395: Recognize remote executables in Emacs >= 27.1., Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 92c91ca 342/395: counsel.el (counsel-org-capture): Display descriptions from prefix keys, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra accc0fe 339/395: counsel.el (counsel-compile--probe-make-targets): fail more gracefully, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 215bb22 348/395: ivy.el (ivy-configure): Only change a value if it was not modified by the user, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 4894b65 329/395: ivy-avy.el: Don't overwrite existing ivy-minibuffer-map binding, Basil L. Contovounesios, 2021/02/25