[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 576563d 082/167: ivy.el (with-ivy-window): Ensure window i
From: |
Oleh Krehel |
Subject: |
[elpa] master 576563d 082/167: ivy.el (with-ivy-window): Ensure window is live |
Date: |
Tue, 08 Dec 2015 10:50:03 +0000 |
branch: master
commit 576563da24ef783fa8a6de71eb1f95aacf4862c3
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
ivy.el (with-ivy-window): Ensure window is live
* ivy.el (ivy--get-window): New defun.
---
ivy.el | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/ivy.el b/ivy.el
index b6c8b08..10c019d 100644
--- a/ivy.el
+++ b/ivy.el
@@ -281,7 +281,7 @@ When non-nil, it should contain one %d.")
"Execute BODY in the window from which `ivy-read' was called."
(declare (indent 0)
(debug t))
- `(with-selected-window (ivy-state-window ivy-last)
+ `(with-selected-window (ivy--get-window ivy-last)
,@body))
(defun ivy--done (text)
@@ -617,6 +617,15 @@ If the input is empty, select the previous history element
instead."
action
(cadr (nth (car action) action))))))
+(defun ivy--get-window (state)
+ "Get the window from STATE."
+ (let ((window (ivy-state-window state)))
+ (if (window-live-p window)
+ window
+ (if (= (length (window-list)) 1)
+ (selected-window)
+ (next-window )))))
+
(defun ivy--actionp (x)
"Return non-nil when X is a list of actions."
(and x (listp x) (not (eq (car x) 'closure))))
- [elpa] master 2386277 060/167: ivy.el (ivy-resume): Pass caller, (continued)
- [elpa] master 2386277 060/167: ivy.el (ivy-resume): Pass caller, Oleh Krehel, 2015/12/08
- [elpa] master 607fd1f 061/167: Bring back the lost perfect match logic, Oleh Krehel, 2015/12/08
- [elpa] master f0acebd 063/167: Fix Custom menus, Oleh Krehel, 2015/12/08
- [elpa] master f6dd9cd 066/167: ivy.el (ivy-alt-done): Fix up last commit, Oleh Krehel, 2015/12/08
- [elpa] master a11c978 068/167: ivy-immediate-done should use ivy--directory, Oleh Krehel, 2015/12/08
- [elpa] master d8673f8 078/167: ivy.el (ffap): Move require, Oleh Krehel, 2015/12/08
- [elpa] master 47f53b6 073/167: counsel.el (counsel--find-symbol): Resolve name clash better, Oleh Krehel, 2015/12/08
- [elpa] master dc84ba3 070/167: Rename and move the minibuffer faces, Oleh Krehel, 2015/12/08
- [elpa] master 183b803 071/167: Use a specific blending method for dark themes, Oleh Krehel, 2015/12/08
- [elpa] master f9ef307 072/167: Improve the preselect index in ivy-resume, Oleh Krehel, 2015/12/08
- [elpa] master 576563d 082/167: ivy.el (with-ivy-window): Ensure window is live,
Oleh Krehel <=
- [elpa] master f60d10e 075/167: "C-x C-f M-n" can call ffap-url-fetcher when at URL, Oleh Krehel, 2015/12/08
- [elpa] master bd93a0f 081/167: ivy.el (ivy-state): Add a new field BUFFER, Oleh Krehel, 2015/12/08
- [elpa] master 202546b 080/167: swiper.el (swiper-mc): Update, Oleh Krehel, 2015/12/08
- [elpa] master f00696a 056/167: ivy.el (ivy-extra-directories): Improve :type, Oleh Krehel, 2015/12/08
- [elpa] master e338785 057/167: ivy.el (ivy-sort-functions-alist): Upgrade to defcustom, Oleh Krehel, 2015/12/08
- [elpa] master 71695df 065/167: "C-j" should not stop completion for a pasted file path, Oleh Krehel, 2015/12/08
- [elpa] master dfd6204 064/167: Fix pasting file paths on Windows, Oleh Krehel, 2015/12/08
- [elpa] master 1af25f6 067/167: swiper.el (swiper-font-lock-ensure): Amend exception list, Oleh Krehel, 2015/12/08
- [elpa] master 5f22310 069/167: counsel.el (counsel-git): Update default-directory, Oleh Krehel, 2015/12/08
- [elpa] master 4a04d6e 031/167: Default ivy-display-style to 'fancy for Emacs>=24.5, Oleh Krehel, 2015/12/08