I have 2 suggestions :
1) give a more elaborate explanation of the new 'search with selected" text. Now the user might get the impression that without this option a selection will not be used for a search, it does. The new feature is : "during" a search, the "search" text can change due to a new selection !!! Where in the former case it remains consistent, but when a selection was made before one starts the search that selection is the search text in the popping up find/replace-dialog.
Pff, dunno anymore : you might already see the selection was used, since you got into the dialog and see your selection text in it. Is a bit confusing.
2) find and replace dialog --> the 2 new get functions do the same thing in there if branch and else branch . I would suggest not to branch because this just makes the code unclear and people writing the code might wonder, is it a bug, did I overlook something ...