Fix file save if modified and clicking on a search result