Real Xedit uses a priority queue to determine where to place the cursor. The cursor locations associated with different commands (e.g. positioning the cursor on the inserted line, when the user inserts a line) are assigned priorities. The CURSOR subcommand also has an optional Priority operand. When Xedit refreshes the screen, it positions the cursor based on the highest priority position of all the cursor positions that have been set by various subcommands.
I've tried to emulate this with a macro on the Enter key for a couple of releases, but trying to guess what commands the user issued since last pressing Enter is of course ... error-prone, so it's a poor emulation, at best.