]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix ido-enable-dot-prefix for empty choice (Bug#26997)
authorRyan <rct@thompsonclan.org>
Fri, 19 May 2017 15:07:57 +0000 (11:07 -0400)
committerNoam Postavsky <npostavs@gmail.com>
Sun, 21 May 2017 01:54:02 +0000 (21:54 -0400)
* 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

index 1393d3b71077c99fddc0986b9b629957af704c6a..07a5bcf7229f9c7467e2ba2cf3f58dde4d1c7f47 100644 (file)
@@ -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)