Improve preview window handling

Use psearch instead of pedit since pedit essentially reloads the file
and creates an empty undo entry. This also makes it faster.