I don't think this behavior is quite right. Currently, you can only delete file from file tree, and this is done by using the context menu, so by definition, the file is selected (i.e. shown in editor).

To determine the file that should become selected, we should first look for Working Files. When deleting the *first* file in folder list, this is currently working correctly. If there are any other Working Files, then on e of them is selected, otherwise nothing is selected.

For non-first files in folder list, this currently selects previous file in folder list. It should instead choose from remaining Working Files. If there are no Working Files, then I think nothing should be selected (like File > Close), but I guess this should be discussed with team.