diff options
| author | Bozhidar Batsov <bozhidar@batsov.dev> | 2026-03-02 23:16:14 +0200 |
|---|---|---|
| committer | Bozhidar Batsov <bozhidar@batsov.dev> | 2026-03-04 21:43:10 +0200 |
| commit | fd3b64146e581ad10c383bb7335407188184b07b (patch) | |
| tree | b3db660c781749a774cd07d545b63a4333067e9d /projectile.el | |
| parent | 6f637948596bc7aff9fb0ac1cc88d910512bb488 (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.
Diffstat (limited to 'projectile.el')
| -rw-r--r-- | projectile.el | 2 |
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)) |
