branch: externals/ivy-hydra
commit e42e0b32fdb375b5c9e98fb4e96499876e6cc6b6
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
ivy-hydra.el (ivy-minibuffer-grow): Move
---
ivy-hydra.el | 18 ++++++++++++++++--
ivy.el | 14 --------------
2 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/ivy-hydra.el b/ivy-hydra.el
index 3bf31c5..0c701a6 100644
--- a/ivy-hydra.el
+++ b/ivy-hydra.el
@@ -41,8 +41,22 @@
(cdr cell)
"other")))
+(defun ivy-minibuffer-grow ()
+ "Grow the minibuffer window by 1 line."
+ (interactive)
+ (setq-local max-mini-window-height
+ (cl-incf ivy-height)))
+
+(defun ivy-minibuffer-shrink ()
+ "Shrink the minibuffer window by 1 line."
+ (interactive)
+ (when (> ivy-height 2)
+ (setq-local max-mini-window-height
+ (cl-decf ivy-height))
+ (window-resize nil -1)))
+
(defhydra hydra-ivy (:hint nil
- :color pink)
+ :color pink)
"
^ ^ ^ ^ ^ ^ | ^Call^ ^ ^ | ^Cancel^ | ^Options^ | Action _w_/_s_/_a_:
%-14s(ivy-action-name)
^-^-^-^-^-^-+-^-^---------^-^--+-^-^------+-^-^-------+-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---------------------------
@@ -84,7 +98,7 @@ _h_ ^+^ _l_ | _d_one ^ ^ | _o_ops | _M_: matcher
%-5s(ivy--matcher-desc)
("U" ivy-occur :exit t)
("D" (ivy-exit-with-action
(lambda (_) (find-function 'hydra-ivy/body)))
- :exit t))
+ :exit t))
(defvar ivy-dispatching-done-columns 2
"Number of columns to use if the hint does not fit on one line.")
diff --git a/ivy.el b/ivy.el
index b0ff376..10cfc71 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1347,20 +1347,6 @@ if one exists."
(ivy-set-index (max (1+ (- ivy--index ivy-height))
0)))
-(defun ivy-minibuffer-grow ()
- "Grow the minibuffer window by 1 line."
- (interactive)
- (setq-local max-mini-window-height
- (cl-incf ivy-height)))
-
-(defun ivy-minibuffer-shrink ()
- "Shrink the minibuffer window by 1 line."
- (interactive)
- (when (> ivy-height 2)
- (setq-local max-mini-window-height
- (cl-decf ivy-height))
- (window-resize nil -1)))
-
(defun ivy-next-line (&optional arg)
"Move cursor vertically down ARG candidates."
(interactive "p")