[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master b7fcfc6: Fix INITIAL-INPUT cons handling in ido-rea
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] master b7fcfc6: Fix INITIAL-INPUT cons handling in ido-read-internal |
Date: |
Mon, 15 Jul 2019 14:54:29 -0400 (EDT) |
branch: master
commit b7fcfc64120f95ed16721b4c5cdc737b45c5b78c
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
Fix INITIAL-INPUT cons handling in ido-read-internal
* 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).
---
lisp/ido.el | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/lisp/ido.el b/lisp/ido.el
index bf2c745..e14f015 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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master b7fcfc6: Fix INITIAL-INPUT cons handling in ido-read-internal,
Lars Ingebrigtsen <=