aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--projectile.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/projectile.el b/projectile.el
index c0591d5..aedc66d 100644
--- a/projectile.el
+++ b/projectile.el
@@ -5040,8 +5040,13 @@ on which to run the replacement."
(new-text (read-string
(projectile-prepend-project-name
(format "Replace %s with: " old-text))))
- (files (projectile-files-with-string old-text directory file-ext)))
- (fileloop-initialize-replace (regexp-quote old-text) new-text files 'default)
+ (files (projectile-files-with-string old-text directory file-ext))
+ ;; Filter results through the project's file list so that files
+ ;; ignored via .projectile or other ignore rules are excluded.
+ (project-files (mapcar (lambda (file) (expand-file-name file directory))
+ (projectile-dir-files directory)))
+ (filtered-files (seq-filter (lambda (f) (member f project-files)) files)))
+ (fileloop-initialize-replace (regexp-quote old-text) new-text filtered-files 'default)
(fileloop-continue)))
;;;###autoload