Skip to content

Commit

Permalink
Fix the performance of counsel-projectile-switch-to-buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
pinetr2e authored and ericdanan committed Aug 14, 2017
1 parent 575bf98 commit d55966f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions counsel-projectile.el
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,10 @@ With a prefix ARG invalidates the cache first."
Like `projectile-project-buffer-names', but propertize buffer
names as in `ivy--buffer-list'."
(ivy--buffer-list "" nil
(lambda (x)
(member (car x) (projectile-project-buffer-names)))))
(let ((buffer-names (projectile-project-buffer-names)))
(ivy--buffer-list "" nil
(lambda (x)
(member (car x) buffer-names)))))

(defun counsel-projectile--switch-buffer-action (buffer &optional other-window)
"Switch to BUFFER.
Expand Down

0 comments on commit d55966f

Please sign in to comment.