From f422b46eb1d3c62c912ee0806486d017f5153e54 Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 19 May 2017 11:07:57 -0400 Subject: [PATCH] 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 --- lisp/ido.el | 7 ++++--- 1 file 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) -- 2.39.2