# HG changeset patch # User Kim F. Storm # Date 1167186156 0 # Node ID 2de62cd68677723575487e91d820b9ac5bc10f2a # Parent d70e2274fe2032d2c097a5669d616a7e8aa1f079 (ido-set-matches-1): Fix last change. If default item is current buffer, it is ok to be first. diff -r d70e2274fe20 -r 2de62cd68677 lisp/ido.el --- a/lisp/ido.el Wed Dec 27 02:22:24 2006 +0000 +++ b/lisp/ido.el Wed Dec 27 02:22:36 2006 +0000 @@ -1046,6 +1046,9 @@ ;; Stores the current ido item type ('file, 'dir, 'buffer, or 'list). (defvar ido-cur-item) +;;; Stores the current default item +(defvar ido-default-item) + ;; Stores the current list of items that will be searched through. ;; The list is ordered, so that the most interesting item comes first, ;; although by default, the files visible in the current frame are put @@ -3580,6 +3583,8 @@ (string-match re name)) (cond ((and (eq ido-cur-item 'buffer) + (or (not (stringp ido-default-item)) + (not (string= name ido-default-item))) (string= name (buffer-name ido-entry-buffer))) (setq matches (cons item matches))) ((and full-re (string-match full-re name))