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
Please register or sign in to comment