[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ivy-hydra af51ffd 139/395: ivy.el (ivy-read-action-ivy)
From: |
Basil L. Contovounesios |
Subject: |
[elpa] externals/ivy-hydra af51ffd 139/395: ivy.el (ivy-read-action-ivy): Don't reset ivy-marked-candidates to nil |
Date: |
Thu, 25 Feb 2021 08:31:49 -0500 (EST) |
branch: externals/ivy-hydra
commit af51ffdb56aa4337aece6bc450e5e18123bcadc8
Author: Oleh Krehel <ohwoeowho@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>
ivy.el (ivy-read-action-ivy): Don't reset ivy-marked-candidates to nil
Fixes #2430
---
ivy.el | 31 ++++++++++++++++---------------
1 file changed, 16 insertions(+), 15 deletions(-)
diff --git a/ivy.el b/ivy.el
index 8da4939..0f464f1 100644
--- a/ivy.el
+++ b/ivy.el
@@ -960,20 +960,28 @@ selection, non-nil otherwise."
(setcar actions (1+ action-idx))
(ivy-set-action actions)))))
+(defvar ivy-marked-candidates nil
+ "List of marked candidates.
+Use `ivy-mark' to populate this.
+
+When this list is non-nil at the end of the session, the action
+will be called for each element of this list.")
+
(defun ivy-read-action-ivy (actions)
"Select an action from ACTIONS using Ivy."
(let ((enable-recursive-minibuffers t))
(if (and (> (minibuffer-depth) 1)
(eq (ivy-state-caller ivy-last) 'ivy-read-action-ivy))
(minibuffer-keyboard-quit)
- (ivy-read (format "action (%s): " (ivy-state-current ivy-last))
- (cl-mapcar
- (lambda (a i) (cons (format "[%s] %s" (nth 0 a) (nth 2 a)) i))
- (cdr actions) (number-sequence 1 (length (cdr actions))))
- :action (lambda (a)
- (setcar actions (cdr a))
- (ivy-set-action actions))
- :caller 'ivy-read-action-ivy))))
+ (let ((ivy-marked-candidates ivy-marked-candidates))
+ (ivy-read (format "action (%s): " (ivy-state-current ivy-last))
+ (cl-mapcar
+ (lambda (a i) (cons (format "[%s] %s" (nth 0 a) (nth 2 a))
i))
+ (cdr actions) (number-sequence 1 (length (cdr actions))))
+ :action (lambda (a)
+ (setcar actions (cdr a))
+ (ivy-set-action actions))
+ :caller 'ivy-read-action-ivy)))))
(defun ivy-shrink-after-dispatching ()
"Shrink the window after dispatching when action list is too large."
@@ -1467,13 +1475,6 @@ See variable `ivy-recursive-restore' for further
information."
(not (eq ivy-last ivy-recursive-last)))
(ivy--reset-state (setq ivy-last ivy-recursive-last))))
-(defvar ivy-marked-candidates nil
- "List of marked candidates.
-Use `ivy-mark' to populate this.
-
-When this list is non-nil at the end of the session, the action
-will be called for each element of this list.")
-
(defvar ivy-mark-prefix ">"
"Prefix used by `ivy-mark'.")
- [elpa] externals/ivy-hydra e05bc45 108/395: ivy.el (ivy--recompute-index): Take one less argument, (continued)
- [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
- [elpa] externals/ivy-hydra 2229801 142/395: counsel.el (counsel-M-x-action): Trim left ^, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra af51ffd 139/395: ivy.el (ivy-read-action-ivy): Don't reset ivy-marked-candidates to nil,
Basil L. Contovounesios <=
- [elpa] externals/ivy-hydra 8f3e589 138/395: counsel.el: Add "overwrite" action to counsel-bookmark, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 6930d72 143/395: ivy.el (ivy--kill-current-candidate): Specialize and fix for buffers, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 22028d4 146/395: counsel.el (counsel--string-trim-left): Add, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra ba4c1d5 151/395: swiper.el (swiper-C-s): New command bound to "C-s" for swiper, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 83873c7 152/395: ivy.el (ivy--dynamic-collection-cands): Accept alist from dynamic-collection, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra db45501 153/395: Add counsel-find-file action: find-file-literally, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra b83d271 171/395: ivy.el (ivy-backward-kill-word): Actually kill-word, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 4b4f7c8 163/395: swiper.el (swiper-occur): Works with marked candidates, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 3915890 172/395: ivy.el (ivy-format-function-line): Add doc about :extend t, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra ea1e4f3 165/395: ivy.el (ivy-avy): Add a warning for M-x, Basil L. Contovounesios, 2021/02/25