(ido-set-matches-1): Never put current buffer first if
authorKim F. Storm <storm@cua.dk>
Wed, 27 Dec 2006 00:26:54 +0000 (00:26 +0000)
committerKim F. Storm <storm@cua.dk>
Wed, 27 Dec 2006 00:26:54 +0000 (00:26 +0000)
there are other matches.

lisp/ido.el

index 2d4ac21..b398e68 100644 (file)
@@ -3579,6 +3579,9 @@ for first matching file."
                            (/= (aref name 0) ?.)))
                      (string-match re name))
                 (cond
+                 ((and (eq ido-cur-item 'buffer)
+                       (string= name (buffer-name ido-entry-buffer)))
+                  (setq matches (cons item matches)))
                  ((and full-re (string-match full-re name))
                   (setq full-matches (cons item full-matches)))
                  ((and suffix-re (string-match suffix-re name))