insert undo boundary at a reasonable interval in input mode