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.
This is a simple implementation of a replace feature.
Find continues to work as before, but there is an additional replace line and button. Pressing the button, or hitting enter with the replace line focussed, does a replace.
No attempt is made to perform capture interpolation, e.g. of
$1
(It's not hard, and I have all the necessary bits of code, but different editors have different behaviours so I want to separate out thatbikesheddingspecification discussion).One issue I have found is that the tab order is not stable. I don't know if I'm doing something wrong or whether this is a (mis)feature of the way blessed objects are created, where they specify their parents rather than being actively appended to them as you would with a DOM. It is usable, and always possible to tab to all the fields, but sometimes when hitting tab from the find field, you get the replace field, as you'd expect, and other times, you get the Replace button. I'm not able to solve this but I wonder if the react-blessed rewrite will take care of it.
Note that this renders #367 redundant.