Fix cursor movement after trigger insertion