Insert at the caret as one update, single-line and multi-line breaks,
control characters, the maximum length and surrogate pair boundaries, the
text filter running once, a clipboard of megabytes, invalid UTF-8, a
paste while nothing captures the keyboard and a paste while the input
method holds a composition.