* lisp/ido.el (ido-read-internal): Is INITIAL-INPUT is a cons that
specifies cursor position, adjust the number to be palatable for
`read-for-minibuffer' (bug#27807).
)
(ido-setup-completion-map)
- (setq ido-text-init initial)
+
+ (setq ido-text-init
+ (if (consp initial)
+ (cons (car initial)
+ ;; `completing-read' uses 0-based index while
+ ;; `read-from-minibuffer' uses 1-based index.
+ (1+ (cdr initial)))
+ initial))
(setq ido-input-stack nil)
(run-hooks 'ido-setup-hook)