emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ivy-explorer 81b2a17 24/29: Improve ivy-explorer-read


From: Clemens Radermacher
Subject: [elpa] externals/ivy-explorer 81b2a17 24/29: Improve ivy-explorer-read
Date: Tue, 12 Mar 2019 09:04:38 -0400 (EDT)

branch: externals/ivy-explorer
commit 81b2a176f969b8e71a2648513780113ba7715448
Author: Clemens Radermacher <address@hidden>
Commit: Clemens Radermacher <address@hidden>

    Improve ivy-explorer-read
---
 ivy-explorer.el | 25 ++++++++++++++++---------
 1 file changed, 16 insertions(+), 9 deletions(-)

diff --git a/ivy-explorer.el b/ivy-explorer.el
index 7848711..d82d99c 100644
--- a/ivy-explorer.el
+++ b/ivy-explorer.el
@@ -662,15 +662,22 @@ Call the permanent action if possible.")
 (defun ivy-explorer-read (prompt coll &optional avy mcols)
   "Read value from an explorer grid.
 
-PROMPT and COLL are the same as for `completing-read'. If AVY is
-non-nil the grid is initilized with avy selection. MCOLS is the
-number of columns to use. If the grid does not fit on the screen
-the number of columns is adjusted to a lower number
-automatically. If not given the the value is calculated
-by (/ (frame-width) 30)."
-  (let ((ivy-explorer-auto-init-avy avy)
-        (ivy-explorer-max-columns (or mcols (/ (frame-width) 30))))
-    (ivy-explorer--internal #'completing-read prompt coll)))
+PROMPT and COLL are the same as for `ivy-read'. If AVY is non-nil
+the grid is initilized with avy selection. MCOLS is the number of
+columns to use. If the grid does not fit on the screen the number
+of columns is adjusted to a lower number automatically. If not
+given the the value is calculated by (/ (frame-width) 30)."
+  (let ((ivy-explorer-max-columns (or mcols (/ (frame-width) 30)))
+        (ivy-wrap nil)
+        (ivy-height (funcall ivy-explorer-max-function))
+        (ivy-display-function #'ivy-explorer--display-function)
+        (ivy-posframe-hide-minibuffer
+         (eq ivy-explorer-message-function #'ivy-explorer--posframe))
+        (ivy-minibuffer-map (make-composed-keymap
+                             ivy-explorer-map ivy-minibuffer-map)))
+    (when avy
+      (run-at-time 0 nil 'ivy-explorer-avy))
+    (ivy-read prompt coll)))
 
 
 (defun ivy-explorer--internal (f &rest args)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]