-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File picker does not match all files #52
Comments
The problem I see with passing an iterator through: you can only consume it once then we'd need to construct a new one which would re-query the file system. As a quick fix we could significantly raise the limit? I just primarily wanted to avoid someone using this on something like |
There is many ways to solve this. A compromise solution could be to search enough to fill the screen (like the first 20 files) and keep the iterator for future search. The previous results can be cached. The drawback is when the user deletes what he was searching a new iterator needs to be created. |
Since we use |
I downloaded
|
I tried on macOS as well. ~ $ sk ~ $ ps -O %mem -p 57760
PID %MEM TT STAT TIME COMMAND
57760 0.2 s002 S+ 0:47.79 sk Translates to roughly 267MB on my machine. |
I looked a bit into skim and I think it does a lot more. Like it does rayon to parallelize search. I wonder if @lotabout have any suggestions how we can integrate it here since we have to display it on a certain rectangle, we may also need to have the ability to do extra filtering later on. |
Oh I don't think we need to embed |
seems to me that this could be closed... |
Agreed, please reopen if you still encounter this problem. |
In the root of my current project I have a
Gemfile
. In a sub directory relative to the root I also have aGemfile
. Opening the file picker and searching forGemfile
only result insub-directory/Gemfile
. The rootGemfile
isn't matched. In fact, a lot of the root level files aren't matched.Rakefile
andProcfile
are not matched whileDockerfile
andGuardfile
are.In a smaller project, these files are found just fine.
Looks like this might be the culprit
helix/helix-term/src/ui/mod.rs
Lines 88 to 91 in c67e318
If the project is large enough, this might exclude files exceeding
MAX
. Since the picker isn't updating the set of files upon filtering, some files will always be excluded.My Rust knowledge is pretty much non-existent, but would it make sense to pass the iterator directly to the picker and let the
Picker
limit the iterator after matching?helix/helix-term/src/ui/picker.rs
Lines 79 to 91 in c67e318
So if
self.options
now is thefiles
iterator containing all results, we could limit the results by adding.take(MAX)
at the end and end up with something like:The text was updated successfully, but these errors were encountered: