Truncate length of newly inserted text to the given length.