Fixed bug where search/replace replace the selection even if it's not pointed to the search result.

Example type following:
a b c d e f g h i j

Now select 'a' and open the replace dialog box.
Type 'e' in 'Find What' textbox and 'E' in
'Replace with' textbox and press 'Replace'.

Failure result:
'a' in the editor will be replaced by 'E'.

Expected result:
'a' will not be replaced and 'e' in the editor
is now selected to be replaced by 'E'.

Solution:
Add a condition to not replace when the
selection isn't pointed to the correct
match of 'Find What'.
changelog for Fixed bug where search/replace replace the selection even if it's not pointed to the search result.