From: Ryan Date: Fri, 19 May 2017 15:07:57 +0000 (-0400) Subject: Fix ido-enable-dot-prefix for empty choice (Bug#26997) X-Git-Tag: emacs-26.0.90~521^2~333 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f422b46eb1d3c62c912ee0806486d017f5153e54;p=emacs.git 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 --- 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)