The sale of the courtyard can only be made subject to any rights you have in your Lease.
This is not a right of light issue - that is only if there is no legal link between the two pieces of land.
Look in your lease. Landlord gives you the right of enjoyment of the property and also rights...