rework doClose and fix doOpen issue when opening a file in a temp view in a non-focused pane