take patch file content out of the search index, clean up dialogwin references when window gets closed