Mercurial > emacs
changeset 74930:2de62cd68677
(ido-set-matches-1): Fix last change. If default item is
current buffer, it is ok to be first.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Wed, 27 Dec 2006 02:22:36 +0000 |
parents | d70e2274fe20 |
children | 94fc36e46118 |
files | lisp/ido.el |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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))