-
-
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
search buffer contents during global search #5652
Conversation
Closes #4207 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not familiar enough with Rust parallelism to review most of this but I think this looks good. I left some small typo fix comments
22b23b4
to
67a9350
Compare
bb342b7
to
5a6f91a
Compare
Slightly unrelated to the PR, but wanted to check if my understanding of the UnboundedReceiverStream is correct. In the asynchronous callback |
Followup to #5639, addresses #5604 (comment)
Currently, helix always queries the FS when performing global search.
However, when previewing and opening a file helix automatically uses the buffer if it's already open.
That means that the search would report incorrect results for unsaved buffers (which lead to crashes prior to #5639).
This PR creates am implementation of
std::io::Read
forRope
, so we can easily reuse the existing API ingrep_searcher
.This change has the nice side effect of avoiding IO for already open buffers for global search. The performance difference will rarely matter in practice, but it's a nice boost when a huge file is already open in helix.
A similar mechanism can be used for #5645 so that files that are changed but unsaved also get reported as changed.