window: Allow users to choose whether the cursor is placed at start or end when historying