branch: master
commit e47ec1471386a8239739904e73a88b8240278be0
Author: Oleh Krehel <ohwoeo...@gmail.com>
Commit: Oleh Krehel <ohwoeo...@gmail.com>

    ivy.el (ivy-completing-read): Fix off by one
    
    Re #295
---
 ivy.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ivy.el b/ivy.el
index 7f79406..9fd181a 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1238,7 +1238,7 @@ The history, defaults and input-method arguments are 
ignored for now."
   ;; See the doc of `completing-read'.
   (when (consp history)
     (when (numberp (cdr history))
-      (setq initial-input (nth (cdr history)
+      (setq initial-input (nth (1- (cdr history))
                                (symbol-value (car history)))))
     (setq history (car history)))
   (ivy-read (replace-regexp-in-string "%" "%%" prompt)

Reply via email to