Closed thirstyice closed 3 years ago
Hey @thirstyice . Congratulations on your first contribution. Unfortunately find-and-replace doesn't support multiline searches because it works on a line by line basis. Inserting a new line on a search term would result in empty result. In order for us to accept this PR we would first need to add support for multiline searches. We currently don't have plans to add that feature.
Description of the Change
Add support for inserting newlines into find and replace fields using a keyboard shortcut (Cmd/Ctrl-Enter by default)
Alternate Designs
Used Cmd/Ctrl-Enter for the default keyboard shortcut because it's functions tended to overlap with other shortcuts, making it redundant.
Benefits
Ability to find + replace strings containing newlines without needing to copy/paste the newline into the text field
Possible Drawbacks
Remapping of default keyboard shortcuts may affect existing workflows.
The code literally just allows for easier insertion of newlines into the text fields. How the program handles newlines is not affected, so if the program is unable to handle newlines in certain cases, this won't change that.
Applicable Issues
Direct solution for #396 Also affects #398