This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
Handle multiline results on the find and replace UI #1085
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the Change
This PR tweaks the logic of the method that handles results from the search provider to be able to support results that span across multiple lines.
Motivation
The current default scanner (
scandal
) does not support multiline regexps, so up until now it was rare to get a search result that contained multiple lines, this is why the current UI does not handle them well.Still, currently there's one situation where multi-line results are shown, which causes a very broken results view (more info), so this PR aims to fix it.
This PR also paves out the support for adding
ripgrep
as backend for the searches, sinceripgrep
can return multi-line results (this is going to be added in a separate PR).Benefits
This will allow find and replace to show multiline results, which is a much requested feature: #303
Possible Drawbacks
Slightly more complex logic for displaying results.