Fixed find-in-files error when used with editor not in focus (fixes #354).