anchor.diff:          }
           _filesMap.remove(resource.uuid);
           // The current selection was deleted. No selected resource.
  -        selectFile(null);
  +        updatedSelection = [];
  +        needsUpdateSelection = true;
           needsReloadData = true;
         } else if (change.type == EventType.RENAME) {
           // Update expanded state of the tree view.
  
positive.code:   }
  
    void selectFile(Resource file) {
      if (file == null) {
        _treeView.listViewSelectedChanged(null, []);
        return;
      }
  
      if (_currentFiles().isEmpty) {
        return;
  
negative.code:     }
      if (needsUpdateSelection) {
        _treeView.selection = updatedSelection;
        _treeView.listViewSelectedChanged(null, []);
      }
    }
  
  