Skip to content
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
merged 2 commits into from
May 24, 2019
Merged

Conversation

rafeca
Copy link
Contributor

@rafeca rafeca commented May 22, 2019

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, since ripgrep 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.

This commit makes sure that async exceptions thrown are handled and
displayed correctly in the find and replace UI
@rafeca rafeca requested review from as-cii and nathansobo May 23, 2019 07:46
@rafeca rafeca merged commit d4bcc42 into master May 24, 2019
@rafeca rafeca deleted the ripgrep-option branch May 24, 2019 10:05
Copy link
Contributor

@nathansobo nathansobo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit late, but I reviewed it and approve. The comments were helpful. ✨

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants