find in files stays in a single line

This PR is in replacement for #6348.
The changes are made as @peterflynn suggested.