[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master b7c40d3 152/272: ivy.el (ivy-resume): Add a guard against
From: |
Oleh Krehel |
Subject: |
[elpa] master b7c40d3 152/272: ivy.el (ivy-resume): Add a guard against null :action |
Date: |
Mon, 25 Apr 2016 10:13:22 +0000 |
branch: master
commit b7c40d380bef08a4681f14bb1164b209621743da
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
ivy.el (ivy-resume): Add a guard against null :action
Re syl20bnr/spacemacs#5335
---
ivy.el | 46 ++++++++++++++++++++++++----------------------
1 file changed, 24 insertions(+), 22 deletions(-)
diff --git a/ivy.el b/ivy.el
index fa156f8..9d79617 100644
--- a/ivy.el
+++ b/ivy.el
@@ -663,28 +663,30 @@ If the text hasn't changed as a result, forward to
`ivy-alt-done'."
(defun ivy-resume ()
"Resume the last completion session."
(interactive)
- (when (eq (ivy-state-caller ivy-last) 'swiper)
- (switch-to-buffer (ivy-state-buffer ivy-last)))
- (with-current-buffer (ivy-state-buffer ivy-last)
- (ivy-read
- (ivy-state-prompt ivy-last)
- (ivy-state-collection ivy-last)
- :predicate (ivy-state-predicate ivy-last)
- :require-match (ivy-state-require-match ivy-last)
- :initial-input ivy-text
- :history (ivy-state-history ivy-last)
- :preselect (unless (eq (ivy-state-collection ivy-last)
- 'read-file-name-internal)
- ivy--current)
- :keymap (ivy-state-keymap ivy-last)
- :update-fn (ivy-state-update-fn ivy-last)
- :sort (ivy-state-sort ivy-last)
- :action (ivy-state-action ivy-last)
- :unwind (ivy-state-unwind ivy-last)
- :re-builder (ivy-state-re-builder ivy-last)
- :matcher (ivy-state-matcher ivy-last)
- :dynamic-collection (ivy-state-dynamic-collection ivy-last)
- :caller (ivy-state-caller ivy-last))))
+ (if (null (ivy-state-action ivy-last))
+ (user-error "The last session isn't compatible with `ivy-resume'")
+ (when (eq (ivy-state-caller ivy-last) 'swiper)
+ (switch-to-buffer (ivy-state-buffer ivy-last)))
+ (with-current-buffer (ivy-state-buffer ivy-last)
+ (ivy-read
+ (ivy-state-prompt ivy-last)
+ (ivy-state-collection ivy-last)
+ :predicate (ivy-state-predicate ivy-last)
+ :require-match (ivy-state-require-match ivy-last)
+ :initial-input ivy-text
+ :history (ivy-state-history ivy-last)
+ :preselect (unless (eq (ivy-state-collection ivy-last)
+ 'read-file-name-internal)
+ ivy--current)
+ :keymap (ivy-state-keymap ivy-last)
+ :update-fn (ivy-state-update-fn ivy-last)
+ :sort (ivy-state-sort ivy-last)
+ :action (ivy-state-action ivy-last)
+ :unwind (ivy-state-unwind ivy-last)
+ :re-builder (ivy-state-re-builder ivy-last)
+ :matcher (ivy-state-matcher ivy-last)
+ :dynamic-collection (ivy-state-dynamic-collection ivy-last)
+ :caller (ivy-state-caller ivy-last)))))
(defvar-local ivy-calling nil
"When non-nil, call the current action when `ivy--index' changes.")
- [elpa] master abf880f 214/272: ivy.el (ivy-read): Make "M-o" not modify the action, (continued)
- [elpa] master abf880f 214/272: ivy.el (ivy-read): Make "M-o" not modify the action, Oleh Krehel, 2016/04/25
- [elpa] master 3f4f080 226/272: counsel-ag now works with ivy-occur-revert-buffer, Oleh Krehel, 2016/04/25
- [elpa] master f31ab12 066/272: swiper.el (swiper--ivy): Return point, Oleh Krehel, 2016/04/25
- [elpa] master 6777cf8 220/272: counsel.el (counsel-unquote-regex-parens): Improve, Oleh Krehel, 2016/04/25
- [elpa] master ddc1d9f 114/272: Move all faces to ivy-faces group, Oleh Krehel, 2016/04/25
- [elpa] master e92d282 195/272: Make ivy-ignore-buffers similar to ido-ignore-buffers., Oleh Krehel, 2016/04/25
- [elpa] master 4235ffc 092/272: colir.el (colir-blend-face-background): Improve, Oleh Krehel, 2016/04/25
- [elpa] master 9aee83a 105/272: ivy.el (ivy-completion-in-region): Bind completion-ignore-case, Oleh Krehel, 2016/04/25
- [elpa] master 2a1ef54 148/272: ivy-dispatching-done should not permanently modify default action index, Oleh Krehel, 2016/04/25
- [elpa] master 5eaf787 078/272: doc/ivy.org: Improve the Texinfo/HTML export structure, Oleh Krehel, 2016/04/25
- [elpa] master b7c40d3 152/272: ivy.el (ivy-resume): Add a guard against null :action,
Oleh Krehel <=
- [elpa] master 2ab9c54 197/272: ivy.el (ivy--switch-buffer-matcher): Fix, Oleh Krehel, 2016/04/25
- [elpa] master db00518 270/272: Bump version to 0.8.0, Oleh Krehel, 2016/04/25
- [elpa] master 96828c2 100/272: ivy.el (ivy-read): Identify extra-actions by caller as well, Oleh Krehel, 2016/04/25
- [elpa] master d425392 178/272: Correctly expand the file name at point, Oleh Krehel, 2016/04/25
- [elpa] master 8201f36 224/272: ivy.el (ivy-occur-revert-buffer): Improve for counsel-git-grep, Oleh Krehel, 2016/04/25
- [elpa] master 20f11b7 159/272: New command ivy-occur-revert-buffer bound to "g", Oleh Krehel, 2016/04/25
- [elpa] master d8da9c4 188/272: counsel.el (counsel-mode): Allow use of describe-prefix-bindings, Oleh Krehel, 2016/04/25
- [elpa] master ab795d0 265/272: Don't highlight that match in the file name part, Oleh Krehel, 2016/04/25
- [elpa] master 255457a 177/272: Fixed counsel-list-processes-action-switch to use correct buffer., Oleh Krehel, 2016/04/25
- [elpa] master 48b5638 129/272: ivy.el (ivy-next-history-element): Don't add symbol bounds for file names, Oleh Krehel, 2016/04/25