Fix duplication in counsel-projectile

If the first file in the projectile-current-project-files is also a
buffer, it will appear twice in the counsel-projectile list. This is
fixed by reassigning the result of the delete expression to the files
list.
This commit is contained in:
tummychow 2017-09-22 18:26:08 -04:00
parent 20557b47a9
commit b57c635ba0

View file

@ -454,7 +454,7 @@ Invokes the command referenced by
file) file)
(dolist (buffer counsel-projectile--buffers files) (dolist (buffer counsel-projectile--buffers files)
(when (setq file (buffer-file-name (get-buffer buffer))) (when (setq file (buffer-file-name (get-buffer buffer)))
(delete (file-relative-name file root) files))))))) (setq files (delete (file-relative-name file root) files))))))))
(defun counsel-projectile--matcher (regexp candidates) (defun counsel-projectile--matcher (regexp candidates)
"Return REGEXP-matching CANDIDATES. "Return REGEXP-matching CANDIDATES.