editor: finding common ancestor