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

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

[elpa] master fcb18e5 44/67: ivy.el (ivy-read): Bring last history candi


From: Oleh Krehel
Subject: [elpa] master fcb18e5 44/67: ivy.el (ivy-read): Bring last history candidate to front
Date: Sun, 22 Mar 2015 17:34:05 +0000

branch: master
commit fcb18e5484c32eea520a66a0c3c2d58de70bb9bd
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    ivy.el (ivy-read): Bring last history candidate to front
---
 ivy.el |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/ivy.el b/ivy.el
index 79d3bff..80a0e8d 100644
--- a/ivy.el
+++ b/ivy.el
@@ -145,8 +145,10 @@ If INDEX is non-nil select the corresponding candidate."
              ivy-minibuffer-map
              nil
              'ivy-history))
-       (pop ivy-history)
-       (add-to-list 'ivy-history ivy-text)
+       (when (eq ivy-exit 'done)
+         (pop ivy-history)
+         (setq ivy-history
+               (cons ivy-text (delete ivy-text ivy-history))))
        (remove-hook 'post-command-hook #'ivy--exhibit)))))
 
 (defvar ivy-text ""



reply via email to

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