aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBozhidar Batsov <bozhidar@batsov.dev>2026-03-02 23:16:14 +0200
committerBozhidar Batsov <bozhidar@batsov.dev>2026-03-04 21:43:10 +0200
commitfd3b64146e581ad10c383bb7335407188184b07b (patch)
treeb3db660c781749a774cd07d545b63a4333067e9d
parent6f637948596bc7aff9fb0ac1cc88d910512bb488 (diff)
Use string-search instead of string-match in projectile-select-files
The filename text at point (from thing-at-point or region) was used directly as a regexp pattern in string-match. Characters like [ ] ( ) would cause invalid-regexp errors or incorrect matches. Use string-search for literal substring matching instead.
-rw-r--r--projectile.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/projectile.el b/projectile.el
index 6c833af..be6dd16 100644
--- a/projectile.el
+++ b/projectile.el
@@ -2503,7 +2503,7 @@ With a prefix arg INVALIDATE-CACHE invalidates the cache first."
(files (if file
(seq-filter
(lambda (project-file)
- (string-match file project-file))
+ (string-search file project-file))
project-files)
nil)))
files))