Skip to content
Commit 602386d3 authored by Waqar Ahmed's avatar Waqar Ahmed
Browse files

Only match last section of pattern when matching for path

Since filenames are very unlikely to contain a '/', take the last portion
of the pattern to match filename because otherwise we just waste cpu
trying to match a pattern that will never match a path.

Also, when just matching filename, if the file path == file name,
give it extra score. Such files are files that are present in project
root dir and matching them directly becomes hard if there are many
files with the same name in the project. Consider:

CMakeLists.txt
src/CMakeLists.txt
...

On typing "cmake"

the first one will appear at top. If one really wants some other cmake
file, one can jump to that easily using path matching: s/cmake
parent c2105380
Pipeline #132818 passed with stage
in 5 minutes and 3 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment