[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 7dea040 066/184: ivy.el (ivy-pre-prompt-function): Add
From: |
Oleh Krehel |
Subject: |
[elpa] master 7dea040 066/184: ivy.el (ivy-pre-prompt-function): Add |
Date: |
Wed, 16 Oct 2019 13:14:50 -0400 (EDT) |
branch: master
commit 7dea040b5280a4cfeb303448e79f0f51cd713fa5
Author: Takaaki ISHIKAWA <address@hidden>
Commit: Oleh Krehel <address@hidden>
ivy.el (ivy-pre-prompt-function): Add
Fixes #2185
---
ivy.el | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/ivy.el b/ivy.el
index 1094946..a0d1c63 100644
--- a/ivy.el
+++ b/ivy.el
@@ -180,6 +180,12 @@ Set this to \"(%d/%d) \" to display both the index and the
count."
(const :tag "Count matches and show current match" "(%d/%d) ")
string))
+(defcustom ivy-pre-prompt-function nil
+ "When non-nil, add strings before the `ivy-read' prompt."
+ :type '(choice
+ (const :tag "Do nothing" nil)
+ (function :tag "Custom function")))
+
(defcustom ivy-add-newline-after-prompt nil
"When non-nil, add a newline after the `ivy-read' prompt."
:type 'boolean)
@@ -2904,6 +2910,8 @@ parts beyond their respective faces `ivy-confirm-face' and
(concat n-str d-str "\n"))
(t
(concat n-str d-str)))))
+ (when ivy-pre-prompt-function
+ (setq n-str (concat (funcall ivy-pre-prompt-function) n-str)))
(when ivy-add-newline-after-prompt
(setq n-str (concat n-str "\n")))
(let ((regex (format "\\([^\n]\\{%d\\}\\)[^\n]" (window-width))))
- [elpa] master f66eec5 059/184: Add counsel-buffer-or-recentf, (continued)
- [elpa] master f66eec5 059/184: Add counsel-buffer-or-recentf, Oleh Krehel, 2019/10/16
- [elpa] master 1303e10 061/184: counsel.el (counsel-M-x-action): Extract, Oleh Krehel, 2019/10/16
- [elpa] master ca5040d 078/184: counsel.el (counsel-rg-base-command): Remove "-S" flag, Oleh Krehel, 2019/10/16
- [elpa] master 20d604c 069/184: ivy.el (ivy-restrict-to-matches): Fix for ivy-resume, Oleh Krehel, 2019/10/16
- [elpa] master c307ae9 055/184: swiper.el (swiper--re-builder): Fix symbol bounds with char-fold-to-regexp, Oleh Krehel, 2019/10/16
- [elpa] master 5424a564 082/184: ivy.el (ivy--handle-directory): Extract, Oleh Krehel, 2019/10/16
- [elpa] master d73376f 010/184: ivy.el (ivy--trim-trailing-re): Add, Oleh Krehel, 2019/10/16
- [elpa] master 824f8d7 072/184: counsel.el (counsel--find-return-list): Works with or without "./" prefix, Oleh Krehel, 2019/10/16
- [elpa] master 4fef498 065/184: Use file-name-at-point-functions for file commands, Oleh Krehel, 2019/10/16
- [elpa] master 3d0fcb5 064/184: ivy.el (ivy-partial): Fix trailing space issue, Oleh Krehel, 2019/10/16
- [elpa] master 7dea040 066/184: ivy.el (ivy-pre-prompt-function): Add,
Oleh Krehel <=
- [elpa] master cd7e924 077/184: ivy.el (ivy-read): Fix docstring, Oleh Krehel, 2019/10/16
- [elpa] master da7e546 085/184: ivy.el (ivy-previous-line-and-call): Fix typo, Oleh Krehel, 2019/10/16
- [elpa] master 03fdaea 087/184: doc/ivy.org: Add more recommended key bindings, Oleh Krehel, 2019/10/16
- [elpa] master 941d408 086/184: doc/ivy.org: Fix "C-M-n" description, Oleh Krehel, 2019/10/16
- [elpa] master 4e9aaec 092/184: ivy-test: Fix tests using file names on Windows, Oleh Krehel, 2019/10/16
- [elpa] master 139816a 106/184: counsel.el (counsel-mark-ring): Add the latest mark to selection, Oleh Krehel, 2019/10/16
- [elpa] master 9592cba 101/184: ivy-hydra.el: Use ivy-read-action-by-key in hydra-ivy, Oleh Krehel, 2019/10/16
- [elpa] master 79333e9 099/184: counsel.el (counsel-fonts): Add, Oleh Krehel, 2019/10/16
- [elpa] master 89deb75 096/184: counsel.el (counsel-rg): When in dired, operate on marked files, Oleh Krehel, 2019/10/16
- [elpa] master 4cddec4 102/184: Respect counsel-describe-function-function from counsel-M-x, Oleh Krehel, 2019/10/16