Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

ido-set-matches: avoid repeated calls to reverse if ido-cur-list does…

… not change
  • Loading branch information...
commit c95837d0f0b5d5c5a738418f493d10ce2fb0ed68 1 parent b1ac192
@danskarda authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 ido.el
8 ido.el
@@ -1866,6 +1866,9 @@ If INITIAL is non-nil, it specifies the initial input string."
(ido-enable-prefix ido-enable-prefix)
(ido-enable-regexp ido-enable-regexp)
(ido-show-confirm-message nil)
+ ;; ido-speed-hack caches
+ (ido-cache-cur-list nil)
+ (ido-cache-cur-list-reverse nil)
@@ -3784,7 +3787,10 @@ This is to make them appear as if they were \"virtual buffers\"."
(defun ido-set-matches ()
;; Set `ido-matches' to the list of items matching prompt
(when ido-rescan
- (setq ido-matches (ido-set-matches-1 (reverse ido-cur-list) (not ido-rotate))
+ (unless (eq ido-cur-list ido-cache-cur-list)
+ (setq ido-cache-cur-list ido-cur-list
+ ido-cache-cur-list-reverse (reverse ido-cur-list)))
+ (setq ido-matches (ido-set-matches-1 ido-cache-cur-list-reverse (not ido-rotate))
ido-rotate nil)))
(defun ido-ignore-item-p (name re-list &optional ignore-ext)
Please sign in to comment.
Something went wrong with that request. Please try again.