The ivy-read function assumes that history is a symbol, hence
ivy-completing-read now makes sure that a symbol is given to
ivy-read.
Moreover, it makes sure that the value of initial-input is
coherent with the value of the HISTPOS part of the history
variable if it exists.
Fixes #295
_INHERIT-INPUT-METHOD is ignored for now.
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)
+ (symbol-value (car history)))))
+ (setq history (car history)))
(ivy-read (replace-regexp-in-string "%" "%%" prompt)
collection
:predicate predicate