Keep query and replace text when switching between Replace and Replace In Files

For #8531
... and that's why I didn't use it :D