[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ivy-hydra 6b4f43a 111/395: ivy.el (ivy--update-minibuff
From: |
Basil L. Contovounesios |
Subject: |
[elpa] externals/ivy-hydra 6b4f43a 111/395: ivy.el (ivy--update-minibuffer): Return string |
Date: |
Thu, 25 Feb 2021 08:31:43 -0500 (EST) |
branch: externals/ivy-hydra
commit 6b4f43a140ae16785e0c50a4f903562341844358
Author: Oleh Krehel <ohwoeowho@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>
ivy.el (ivy--update-minibuffer): Return string
---
ivy.el | 89 +++++++++++++++++++++++++++++++++---------------------------------
1 file changed, 45 insertions(+), 44 deletions(-)
diff --git a/ivy.el b/ivy.el
index cb0a0a1..54ef11e 100644
--- a/ivy.el
+++ b/ivy.el
@@ -3267,54 +3267,55 @@ Should be run via minibuffer `post-command-hook'."
(let ((inhibit-field-text-motion nil))
(constrain-to-field nil (point-max)))
(ivy-set-text (ivy--input))
- (ivy--update-minibuffer)))
+ (let ((new-minibuffer (ivy--update-minibuffer)))
+ (when new-minibuffer
+ (ivy--insert-minibuffer new-minibuffer)))
+ t))
(defun ivy--update-minibuffer ()
- (if (ivy-state-dynamic-collection ivy-last)
- ;; while-no-input would cause annoying
- ;; "Waiting for process to die...done" message interruptions
- (let ((inhibit-message t)
- coll in-progress)
- (unless (equal ivy--old-text ivy-text)
- (while-no-input
- (setq coll (funcall (ivy-state-collection ivy-last) ivy-text))
- (when (eq coll 0)
- (setq coll nil)
+ (prog1
+ (if (ivy-state-dynamic-collection ivy-last)
+ ;; while-no-input would cause annoying
+ ;; "Waiting for process to die...done" message interruptions
+ (let ((inhibit-message t)
+ coll in-progress)
+ (unless (equal ivy--old-text ivy-text)
+ (while-no-input
+ (setq coll (funcall (ivy-state-collection ivy-last) ivy-text))
+ (when (eq coll 0)
+ (setq coll nil)
+ (setq ivy--old-re nil)
+ (setq in-progress t))
+ (setq ivy--all-candidates (ivy--sort-maybe coll))))
+ (when (eq ivy--all-candidates 0)
+ (setq ivy--all-candidates nil)
(setq ivy--old-re nil)
(setq in-progress t))
- (setq ivy--all-candidates (ivy--sort-maybe coll))
- (setq ivy--old-text ivy-text)))
- (when (eq ivy--all-candidates 0)
- (setq ivy--all-candidates nil)
- (setq ivy--old-re nil)
- (setq in-progress t))
- (when (or ivy--all-candidates
- (and (not (get-process " *counsel*"))
- (not in-progress)))
- (ivy--set-index-dynamic-collection)
- (ivy--insert-minibuffer
- (ivy--format ivy--all-candidates))))
- (cond (ivy--directory
- (cond ((or (string= "~/" ivy-text)
- (and (string= "~" ivy-text)
- ivy-magic-tilde))
- (ivy--cd (ivy--magic-tilde-directory ivy--directory)))
- ((string-match "/\\'" ivy-text)
- (ivy--magic-file-slash))))
- ((eq (ivy-state-collection ivy-last) #'internal-complete-buffer)
- (when (or (and (string-match "\\` " ivy-text)
- (not (string-match "\\` " ivy--old-text)))
- (and (string-match "\\` " ivy--old-text)
- (not (string-match "\\` " ivy-text))))
- (setq ivy--all-candidates
- (if (= (string-to-char ivy-text) ?\s)
- (ivy--buffer-list " ")
- (ivy--buffer-list "" ivy-use-virtual-buffers)))
- (setq ivy--old-re nil))))
- (ivy--insert-minibuffer
- (with-current-buffer (ivy-state-buffer ivy-last)
- (ivy--format
- (ivy--filter ivy-text ivy--all-candidates))))
+ (when (or ivy--all-candidates
+ (and (not (get-process " *counsel*"))
+ (not in-progress)))
+ (ivy--set-index-dynamic-collection)
+ (ivy--format ivy--all-candidates)))
+ (cond (ivy--directory
+ (cond ((or (string= "~/" ivy-text)
+ (and (string= "~" ivy-text)
+ ivy-magic-tilde))
+ (ivy--cd (ivy--magic-tilde-directory ivy--directory)))
+ ((string-match "/\\'" ivy-text)
+ (ivy--magic-file-slash))))
+ ((eq (ivy-state-collection ivy-last) #'internal-complete-buffer)
+ (when (or (and (string-match "\\` " ivy-text)
+ (not (string-match "\\` " ivy--old-text)))
+ (and (string-match "\\` " ivy--old-text)
+ (not (string-match "\\` " ivy-text))))
+ (setq ivy--all-candidates
+ (if (= (string-to-char ivy-text) ?\s)
+ (ivy--buffer-list " ")
+ (ivy--buffer-list "" ivy-use-virtual-buffers)))
+ (setq ivy--old-re nil))))
+ (with-current-buffer (ivy-state-buffer ivy-last)
+ (ivy--format
+ (ivy--filter ivy-text ivy--all-candidates))))
(setq ivy--old-text ivy-text)))
(defun ivy-display-function-fallback (str)
- [elpa] externals/ivy-hydra 215bb22 348/395: ivy.el (ivy-configure): Only change a value if it was not modified by the user, (continued)
- [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
- [elpa] externals/ivy-hydra 8783d92 321/395: ivy.el: Remove most minibuffer-only commands from the counsel-M-x list, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 40634b7 349/395: ivy.el (ivy--alist-set): Don't touch values set by customize, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 721a3b7 371/395: Make ivy-mode more careful when setting globals, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 5de2662 372/395: counsel.el (counsel-linux-app): Clean up env part of the cmd, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra d2891aa 376/395: Percent-encode counsel-search query, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra f90c018 389/395: counsel.el (counsel-grep-like-occur): Use ivy-text as backup, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 3c53de1 390/395: * .elpaignore: New file., Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 496a5e2 105/395: counsel.el: Fix ivy-occur ivy--regex-function bug, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 6b4f43a 111/395: ivy.el (ivy--update-minibuffer): Return string,
Basil L. Contovounesios <=
- [elpa] externals/ivy-hydra 0ce0bf1 123/395: counsel.el (counsel-evil-marks): Add, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra e05bc45 108/395: ivy.el (ivy--recompute-index): Take one less argument, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 723e4d6 126/395: counsel.el: Point to evil-common for evil-global-marker-p declaration., Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 04e7942 130/395: counsel-kmacro: Small improvements to functions and documentation strings., Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 4d161cc 128/395: counsel-kmacro: Clarify copying of values for next macro user defines., Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 16298bc 137/395: ivy.el (ivy-read-action-format-function): Upgrade to defcustom, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 269583d 125/395: counsel.el (counsel-locate-cmd-es): Switch flags order, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 098f8fe 133/395: swiper.el (swiper-isearch-toggle): Fix up, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra b20a6db 135/395: counsel.el (counsel-recentf-candidates): Sort remote files better, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra d1c3613 140/395: Fix ivy-{next, previous}-line-or-history when input is empty, Basil L. Contovounesios, 2021/02/25