[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ivy-hydra 1ad457d 007/395: ivy.el (ivy-read-action-func
From: |
Basil L. Contovounesios |
Subject: |
[elpa] externals/ivy-hydra 1ad457d 007/395: ivy.el (ivy-read-action-function): Fix type |
Date: |
Thu, 25 Feb 2021 08:31:19 -0500 (EST) |
branch: externals/ivy-hydra
commit 1ad457d8e76c431783d2efb866ef51b8c14e7c82
Author: Oleh Krehel <ohwoeowho@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>
ivy.el (ivy-read-action-function): Fix type
* ivy.el (ivy-dispatching-done): Bind `ivy-exit' so that
`ivy-hydra-read-action' knows to call `ivy-done'.
* ivy-hydra.el (ivy-hydra-read-action): Rename from
`ivy-dispatching-done-hydra'.
Fixes #2284
---
ivy-hydra.el | 16 ++++++++--------
ivy.el | 7 ++++---
2 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/ivy-hydra.el b/ivy-hydra.el
index ce31f2b..1dd039d 100644
--- a/ivy-hydra.el
+++ b/ivy-hydra.el
@@ -62,7 +62,7 @@ _h_ ^+^ _l_ | _d_one ^ ^ | _o_ops | _M_: matcher
%-5s(ivy--matcher-desc)
("t" ivy-toggle-marks)
;; actions
("o" keyboard-escape-quit :exit t)
- ("r" ivy-dispatching-done-hydra :exit t)
+ ("r" ivy-dispatching-done :exit t)
("C-g" keyboard-escape-quit :exit t)
("i" nil)
("C-o" nil)
@@ -94,13 +94,12 @@ _h_ ^+^ _l_ | _d_one ^ ^ | _o_ops | _M_: matcher
%-5s(ivy--matcher-desc)
(defvar ivy-dispatching-done-hydra-exit-keys '(("M-o" nil "back")
("C-g" nil))
- "Keys that can be used to exit `ivy-dispatching-done-hydra'.")
+ "Keys that can be used to exit `ivy-hydra-read-action'.")
-(defun ivy-dispatching-done-hydra ()
+(defun ivy-hydra-read-action (actions)
"Select one of the available actions and call `ivy-done'."
(interactive)
- (let* ((actions (ivy-state-action ivy-last))
- (extra-actions ivy-dispatching-done-hydra-exit-keys)
+ (let* ((extra-actions ivy-dispatching-done-hydra-exit-keys)
(doc (concat "action: "
(mapconcat
(lambda (x) (format "[%s] %s" (nth 0 x) (nth 2 x)))
@@ -121,12 +120,13 @@ _h_ ^+^ _l_ | _d_one ^ ^ | _o_ops | _M_: matcher
%-5s(ivy--matcher-desc)
(list (nth 0 x)
`(progn
(setcar (ivy-state-action ivy-last) ,(cl-incf
i))
- (ivy-done))
+ ,(when (eq ivy-exit 'ivy-dispatching-done)
+ '(ivy-done)))
(nth 2 x)))
(cdr actions))
- ,@extra-actions))))))
+ ,@extra-actions)))
+ nil)))
-(setq ivy-read-action-function (lambda (_) (ivy-dispatching-done-hydra)))
(provide 'ivy-hydra)
diff --git a/ivy.el b/ivy.el
index 1c733dd..3bed34f 100644
--- a/ivy.el
+++ b/ivy.el
@@ -868,7 +868,7 @@ key (a string), cmd and doc (a string)."
:type '(radio
(function-item ivy-read-action-by-key)
(function-item ivy-read-action-ivy)
- (function-item ivy-read-action-hydra)))
+ (function-item ivy-hydra-read-action)))
(defun ivy-read-action ()
"Change the action to one of the available ones.
@@ -925,8 +925,9 @@ selection, non-nil otherwise."
(defun ivy-dispatching-done ()
"Select one of the available actions and call `ivy-done'."
(interactive)
- (when (ivy-read-action)
- (ivy-done))
+ (let ((ivy-exit 'ivy-dispatching-done))
+ (when (ivy-read-action)
+ (ivy-done)))
(ivy-shrink-after-dispatching))
(defun ivy-dispatching-call ()
- [elpa] branch externals/ivy-hydra created (now 65f5783), Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 8dc7a05 008/395: swiper.el (swiper--remember-search-history): Extract, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra d4e17ee 009/395: Also remember search history when using swiper-isearch, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra c5e162a 013/395: swiper.el (swiper-thing-at-point): Use regexp-quote, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra be231a5 001/395: counsel.el (counsel-kmacro): Add, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 1ad457d 007/395: ivy.el (ivy-read-action-function): Fix type,
Basil L. Contovounesios <=
- [elpa] externals/ivy-hydra f6b3b29 011/395: counsel.el (counsel-compile-forget-command): Add, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 7b1af79 012/395: counsel.el (counsel--projectile-root): Add, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 32c097a 004/395: counsel.el (counsel-search): Rename from counsel-google and add DDG, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 884dd9e 025/395: counsel.el (counsel--git-grep-occur-cmd): Handle case folding, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 9666820 037/395: swiper.el (swiper--add-overlays): Don't miss highlights when at eol, Basil L. Contovounesios, 2021/02/25
- [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