summaryrefslogtreecommitdiff
path: root/lisp/ido.el
diff options
context:
space:
mode:
authorRyan <rct@thompsonclan.org>2017-05-19 11:07:57 -0400
committerNoam Postavsky <npostavs@gmail.com>2017-05-20 21:54:02 -0400
commitf422b46eb1d3c62c912ee0806486d017f5153e54 (patch)
tree14f1ee497029183f635703f78ce17b8a390b7bd8 /lisp/ido.el
parent547f78c813c7f792a892a2ee16664b133067f9bc (diff)
downloademacs-f422b46eb1d3c62c912ee0806486d017f5153e54.tar.gz
Fix ido-enable-dot-prefix for empty choice (Bug#26997)
* lisp/ido.el (ido-set-matches-1): Only check first character of item if it's non-empty. Copyright-paperwork-exempt: yes
Diffstat (limited to 'lisp/ido.el')
-rw-r--r--lisp/ido.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/ido.el b/lisp/ido.el
index 1393d3b7107..07a5bcf7229 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -3802,9 +3802,10 @@ frame, rather than all frames, regardless of value of `ido-all-frames'."
(lambda (item)
(let ((name (ido-name item)))
(if (and (or non-prefix-dot
- (if (= (aref ido-text 0) ?.)
- (= (aref name 0) ?.)
- (/= (aref name 0) ?.)))
+ (and (> (length name) 0)
+ (if (= (aref ido-text 0) ?.)
+ (= (aref name 0) ?.)
+ (/= (aref name 0) ?.))))
(string-match re name))
(cond
((and (eq ido-cur-item 'buffer)