diff options
Diffstat (limited to 'lisp/ido.el')
-rw-r--r-- | lisp/ido.el | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/ido.el b/lisp/ido.el index bf2c74558ac..e14f0151690 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -1905,7 +1905,14 @@ If INITIAL is non-nil, it specifies the initial input string." ) (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) |