yorukot / superfile

Pretty fancy and modern terminal file manager
https://superfile.netlify.app
MIT License
7.36k stars 158 forks source link

Search returns incorrect results #243

Closed MrPandir closed 5 months ago

MrPandir commented 5 months ago

Describe the bug

I'm trying to find a py.vim file in a directory that contains 336 files. But the search gives me completely different files that do not include this text

To Reproduce

  1. Open a folder with a lot of files, for me it is /opt/homebrew/Cellar/neovim/0.10.0/share/nvim/runtime/ftplugin
  2. Search for py.vim

Expected behavior

Display only files that contain search text

Screenshot

Screenshot 2024-06-10 at 13 06 30

System information

yorukot commented 5 months ago

These are actually using the textdistance.JaroWinklerDistance algorithm, which check for matches and return a rate(0-1). The filepanel then displays the result based on rate.

Are you sure that you have a file named py.vim?

Thanks for your report. btw!

MrPandir commented 5 months ago

Yes, it really doesn’t exist, I didn’t understand this by searching for superfile. I would like to have an exact search. Check whether the search text contains a substring in the file name.

I see two solutions to this problem:

  1. Change search: to find substring
  2. Replace search with: #115

Probably the second solution will solve many search problems 🤔

yorukot commented 5 months ago

Since the nature is the same as #155, I will close this issue. You can go to #155 to track the latest progress.