[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 7f63f09 04/12: Merge ivy-window into ivy-last
From: |
Oleh Krehel |
Subject: |
[elpa] master 7f63f09 04/12: Merge ivy-window into ivy-last |
Date: |
Sun, 03 May 2015 11:04:52 +0000 |
branch: master
commit 7f63f09580edbc8f72f09fc2d76fca0aa89c73d2
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
Merge ivy-window into ivy-last
* ivy.el (ivy-state): Add a window field.
(ivy-window): Remove defvar.
(ivy-next-line-and-call): Update.
(ivy-previous-line-and-call): Update.
(ivy-read): Update.
---
ivy.el | 19 +++++++++----------
1 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/ivy.el b/ivy.el
index 10b25f5..8ea8334 100644
--- a/ivy.el
+++ b/ivy.el
@@ -119,9 +119,11 @@ Only \"./\" and \"../\" apply here. They appear in reverse
order."
;;* Globals
(cl-defstruct ivy-state
- prompt collection
- predicate require-match initial-input
- history preselect keymap update-fn sort)
+ prompt collection
+ predicate require-match initial-input
+ history preselect keymap update-fn sort
+ ;; The window in which `ivy-read' was called
+ window)
(defvar ivy-last nil
"The last parameters passed to `ivy-read'.")
@@ -141,9 +143,6 @@ of `history-length', which see.")
(defvar ivy-text ""
"Store the user's string as it is typed in.")
-(defvar ivy-window nil
- "Store the window in which `ivy-read' was called.")
-
(defvar ivy--current ""
"Current candidate.")
@@ -378,7 +377,7 @@ If the input is empty, select the previous history element
instead."
(ivy-next-line arg)
(ivy--exhibit)
(when ivy--persistent-action
- (with-selected-window ivy-window
+ (with-selected-window (ivy-state-window ivy-last)
(funcall ivy--persistent-action ivy--current))))
(defun ivy-previous-line-and-call (&optional arg)
@@ -387,7 +386,7 @@ If the input is empty, select the previous history element
instead."
(ivy-previous-line arg)
(ivy--exhibit)
(when ivy--persistent-action
- (with-selected-window ivy-window
+ (with-selected-window (ivy-state-window ivy-last)
(funcall ivy--persistent-action ivy--current))))
(defun ivy-previous-history-element (arg)
@@ -547,9 +546,9 @@ When SORT is t, refer to `ivy-sort-functions-alist' for
sorting."
:preselect preselect
:keymap keymap
:update-fn update-fn
- :sort sort))
+ :sort sort
+ :window (selected-window)))
(setq ivy--directory nil)
- (setq ivy-window (selected-window))
(setq ivy--regex-function
(or (and (functionp collection)
(cdr (assoc collection ivy-re-builders-alist)))
- [elpa] master updated (69bf1bd -> 34753b4), Oleh Krehel, 2015/05/03
- [elpa] master 0353b9f 01/12: Add ivy-state struct, Oleh Krehel, 2015/05/03
- [elpa] master 0210bb6 03/12: Merge ivy-def into ivy-last, Oleh Krehel, 2015/05/03
- [elpa] master d0b6e94 02/12: Allow to quote spaces while matching, Oleh Krehel, 2015/05/03
- [elpa] master 7f63f09 04/12: Merge ivy-window into ivy-last,
Oleh Krehel <=
- [elpa] master 00d1c95 06/12: ivy-resume now works for functions that supply action, Oleh Krehel, 2015/05/03
- [elpa] master cdafe1b 05/12: Merge ivy--action into ivy-last, Oleh Krehel, 2015/05/03
- [elpa] master 2bc08de 07/12: Merge ivy--persistent-action into ivy-state-action, Oleh Krehel, 2015/05/03
- [elpa] master 2e046d1 09/12: Fix the candidate index for `ivy-resume', Oleh Krehel, 2015/05/03
- [elpa] master 109fb7d 08/12: Add unwind argument to ivy-read, Oleh Krehel, 2015/05/03
- [elpa] master b5332c5 10/12: ivy.el (ivy-resume): Quote the preselect, Oleh Krehel, 2015/05/03
- [elpa] master 829bdb6 11/12: swiper.el: Bump version, Oleh Krehel, 2015/05/03
- [elpa] master 34753b4 12/12: Merge commit '829bdb6dcb08e2b1a8d8c329e697156e5fa2dbcc' from swiper, Oleh Krehel, 2015/05/03