I don’t think there was the setting for this purpose, but the “In the selection only” option will be checked automatically if you select more than one line of the text before you display the “Replace” dialog box. However, if the selection does not include a new line (if the selection is only one line), then this check box will not be checked automatically. I hope this makes sense to you.
If you have further questions, please don’t hesitate to ask me. Thank you!