Position the cursor smartly when beginning edition